This works but there must be a better way.
*Esri - your Web Map as JSON in _setPrintParams(a) doesn't pick up rotation.
I subclass the EsriPrintTask and insert the rotation in the string-a-fied map json. I probably should insert it with something other than a string replace, but this works for now.
var CustomPrintTask = EsriPrintTask.createSubclass({
execute: function (a, b) {
internalPrintPrams = this._setPrintParams(a);
internalPrintPrams.Web_Map_as_JSON = internalPrintPrams.Web_Map_as_JSON
.replace(/mapOptions":{/gi,'mapOptions":{"rotation": -' + a.view.rotation.toString() + ',');
return this._geoprocessor["async" === this.mode ? "submitJob" : "execute"](internalPrintPrams, b)
.then(this._handleExecuteResponse)
}
});
me.myPrintTask = new CustomPrintTask();
me.myPrintTask.url = printUrl;
me.myPrintTask.mode = "async";
me.myPrintTask.execute(prntPrms).then().otherwise();
How are you guys getting that cool "code" formatting with the line numbers?
And, do we really have to obfuscate the SDK? Dang, it makes debugging hard in the late evening.