<?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 How to change rest service URL in PrintTask's json  in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-rest-service-url-in-printtask-s-json/m-p/490016#M45537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to&amp;nbsp;a requirement, i want to change graphicsLayer (arcgis/rest/services) service URL from Live IP to Local IP. And than want to use in "&lt;STRONG&gt;printTask.execute&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve this task i develop following code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; alert(&lt;SPAN&gt;map.getLayer(map.graphicsLayerIds&lt;I&gt;).url&lt;/I&gt;&lt;/SPAN&gt;)&amp;nbsp; //Display LiveIP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step2: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;map.getLayer(map.graphicsLayerIds&lt;I&gt;).url = &lt;A class="jivelink1" href="http://10.2.12.182:6080/arcgis/rest/services/IESCO/IESCOData/MapServer/0" title="http://10.2.12.182:6080/arcgis/rest/services/IESCO/IESCOData/MapServer/0"&gt;http://&amp;lt;ServerLocalIP:port&amp;gt;/arcgis/rest/services/&amp;lt;serviceName&amp;gt;/MapServer/0&lt;/A&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Map object updated as per requirement)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var params = new PrintParameters();&lt;/P&gt;&lt;P&gt;params.map = map;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step4: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;printTask.execute(params, function (evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked in fiddler after send request ("&lt;SPAN&gt;printTask.execute"), the created json has LiveIP in&amp;nbsp;Rest service URL instead of LocalIP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanking you in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jul 2019 07:12:53 GMT</pubDate>
    <dc:creator>MamoonRasheed</dc:creator>
    <dc:date>2019-07-31T07:12:53Z</dc:date>
    <item>
      <title>How to change rest service URL in PrintTask's json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-rest-service-url-in-printtask-s-json/m-p/490016#M45537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to&amp;nbsp;a requirement, i want to change graphicsLayer (arcgis/rest/services) service URL from Live IP to Local IP. And than want to use in "&lt;STRONG&gt;printTask.execute&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve this task i develop following code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; alert(&lt;SPAN&gt;map.getLayer(map.graphicsLayerIds&lt;I&gt;).url&lt;/I&gt;&lt;/SPAN&gt;)&amp;nbsp; //Display LiveIP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step2: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;map.getLayer(map.graphicsLayerIds&lt;I&gt;).url = &lt;A class="jivelink1" href="http://10.2.12.182:6080/arcgis/rest/services/IESCO/IESCOData/MapServer/0" title="http://10.2.12.182:6080/arcgis/rest/services/IESCO/IESCOData/MapServer/0"&gt;http://&amp;lt;ServerLocalIP:port&amp;gt;/arcgis/rest/services/&amp;lt;serviceName&amp;gt;/MapServer/0&lt;/A&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Map object updated as per requirement)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var params = new PrintParameters();&lt;/P&gt;&lt;P&gt;params.map = map;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step4: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;printTask.execute(params, function (evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked in fiddler after send request ("&lt;SPAN&gt;printTask.execute"), the created json has LiveIP in&amp;nbsp;Rest service URL instead of LocalIP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanking you in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2019 07:12:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-rest-service-url-in-printtask-s-json/m-p/490016#M45537</guid>
      <dc:creator>MamoonRasheed</dc:creator>
      <dc:date>2019-07-31T07:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to change rest service URL in PrintTask's json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-rest-service-url-in-printtask-s-json/m-p/490017#M45538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks like a duplicate of&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/237767-how-to-change-rest-service-url-in-printtasks-json"&gt;https://community.esri.com/thread/237767-how-to-change-rest-service-url-in-printtasks-json&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 22:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-rest-service-url-in-printtask-s-json/m-p/490017#M45538</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-08-02T22:36:49Z</dc:date>
    </item>
  </channel>
</rss>

