<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JS 4.3 PrintTask - MapView.rotation in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-3-printtask-mapview-rotation/m-p/137573#M12804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to set the rotation on a print task. Anyone know how? I'm about to hack the bloody thing and make the call myself, but there must be a better way. The WebMap JSON is simply missing the Rotate attribute. I just can't seem to intercept it before it chucks it up to my server. Any thoughts are greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Apr 2017 20:41:16 GMT</pubDate>
    <dc:creator>JordanBaumgardner</dc:creator>
    <dc:date>2017-04-11T20:41:16Z</dc:date>
    <item>
      <title>JS 4.3 PrintTask - MapView.rotation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-3-printtask-mapview-rotation/m-p/137573#M12804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to set the rotation on a print task. Anyone know how? I'm about to hack the bloody thing and make the call myself, but there must be a better way. The WebMap JSON is simply missing the Rotate attribute. I just can't seem to intercept it before it chucks it up to my server. Any thoughts are greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 20:41:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-3-printtask-mapview-rotation/m-p/137573#M12804</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-04-11T20:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: JS 4.3 PrintTask - MapView.rotation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-3-printtask-mapview-rotation/m-p/137574#M12805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works but there must be a better way.&lt;/P&gt;&lt;P&gt;*Esri - your Web Map as JSON in _setPrintParams(a) doesn't&amp;nbsp;pick up rotation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I subclass the EsriPrintTask and insert the rotation in the string-a-fied&amp;nbsp;map json. I probably should insert it with something other than a string replace, but this works for now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var CustomPrintTask = EsriPrintTask.createSubclass({&lt;BR /&gt;&amp;nbsp; &amp;nbsp;execute: function (a, b) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; internalPrintPrams = this._setPrintParams(a);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; internalPrintPrams.Web_Map_as_JSON = internalPrintPrams.Web_Map_as_JSON&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.replace(/mapOptions":{/gi,'mapOptions":{"rotation": -' + a.view.rotation.toString() + ',');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return this._geoprocessor["async" === this.mode ? "submitJob" : "execute"](internalPrintPrams, b)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.then(this._handleExecuteResponse)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;me.myPrintTask = new CustomPrintTask();&lt;BR /&gt;me.myPrintTask.url = printUrl;&lt;BR /&gt;me.myPrintTask.mode = "async";&lt;BR /&gt; &lt;BR /&gt;me.myPrintTask.execute(prntPrms).then().otherwise();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you guys getting that cool "code" formatting with the line numbers?&lt;/P&gt;&lt;P&gt;And, do we really have to obfuscate the SDK? Dang, it makes debugging hard in the late evening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 04:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-3-printtask-mapview-rotation/m-p/137574#M12805</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-04-12T04:59:44Z</dc:date>
    </item>
  </channel>
</rss>

