<?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 Re: Get the WebMap from Javascript API esri/map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292639#M26864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I figured it out. I need to pass the &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;_getPrintDefinition() the map and PrintParameters objects. It would be nice if this method were public!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;esri/tasks/PrintTask&lt;/P&gt;&lt;P&gt;Method: _getPrintDefinition(esri.Map, esri.tasks.PrintParameters)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2015 17:50:06 GMT</pubDate>
    <dc:creator>DaveHighness</dc:creator>
    <dc:date>2015-08-18T17:50:06Z</dc:date>
    <item>
      <title>Get the WebMap from Javascript API esri/map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292638#M26863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I need a good method to get the current WebMap object from the Javascript API map. I need to pass the WebMap as JSON to a GP task that will use the arcpy.ExportWebMap_server() tool to create a map image on the server. I was using a hack method I found using the Javascript API PrintTask that was working great until I switched to the latest version of the API (3.14) which I need for other reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var pt = new PrintTask();&lt;/P&gt;&lt;P&gt;var webmap_json = pt._getPrintDefinition(this.map);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The _getPrintDefinition() is an internal method and it appears it no longer works in the latest version of the JS API (3.14). Is there another way to get the WebMap? A method like esri.map.getWebMapJson() would be nice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:56:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292638#M26863</guid>
      <dc:creator>DaveHighness</dc:creator>
      <dc:date>2015-08-18T15:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get the WebMap from Javascript API esri/map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292639#M26864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I figured it out. I need to pass the &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;_getPrintDefinition() the map and PrintParameters objects. It would be nice if this method were public!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;esri/tasks/PrintTask&lt;/P&gt;&lt;P&gt;Method: _getPrintDefinition(esri.Map, esri.tasks.PrintParameters)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 17:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292639#M26864</guid>
      <dc:creator>DaveHighness</dc:creator>
      <dc:date>2015-08-18T17:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get the WebMap from Javascript API esri/map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292640#M26865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, upgrading from 3.13 to 3.17, I needed to add the PrintParameters:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; params &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;esri&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tasks&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PrintParameters&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;template &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; template&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// _getPrintDefinition needed the second parameter: params&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; webMapAsJSON &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; printTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;_getPrintDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; params&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292640#M26865</guid>
      <dc:creator>Cook_CountyGIS</dc:creator>
      <dc:date>2021-12-11T14:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get the WebMap from Javascript API esri/map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292641#M26866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing this.... just what I needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 18:27:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292641#M26866</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2020-02-04T18:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get the WebMap from Javascript API esri/map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292642#M26867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does anyone have a full code sample?&amp;nbsp; i keep getting null or empty for webMapAsJSON&amp;nbsp; &amp;nbsp; trying it it with javascript api 4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2020 17:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/292642#M26867</guid>
      <dc:creator>NathanB</dc:creator>
      <dc:date>2020-03-16T17:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get the WebMap from Javascript API esri/map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/1012492#M71209</link>
      <description>&lt;P&gt;Any luck ?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 17:35:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-webmap-from-javascript-api-esri-map/m-p/1012492#M71209</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-12-28T17:35:41Z</dc:date>
    </item>
  </channel>
</rss>

