<?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: WebMap to json in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148802#M13870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sebastien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try formatting the item id for your webmap in a request like this with f=pjson. If your map is shared with everyone this should work, otherwise, you'll need to embed a token in the request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.arcgis.com/sharing/content/items/1411783d54104bc98a69fa3f80ae0f1a?f=pjson" title="http://www.arcgis.com/sharing/content/items/1411783d54104bc98a69fa3f80ae0f1a?f=pjson"&gt;http://www.arcgis.com/sharing/content/items/YourWebMapID?f=pjson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Oct 2015 18:33:32 GMT</pubDate>
    <dc:creator>DanielStauning</dc:creator>
    <dc:date>2015-10-30T18:33:32Z</dc:date>
    <item>
      <title>WebMap to json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148800#M13868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use Web App Builder and I would like to know if there is a method to export the contents of a webmap to json. It is possible to open a webmap (json) like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Fjssamples%2Fags_createwebmapitem.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jssamples/ags_createwebmapitem.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I have found nothing to export the webmap to json.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following method but it only records what is visible on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var = Web_Map_as_JSON JSON.toJson (printTask._getPrintDefinition (this.map, params));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method does not save everything in the toc and not visible on the map.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148800#M13868</guid>
      <dc:creator>SebastienPelletier</dc:creator>
      <dc:date>2015-10-30T18:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap to json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148801#M13869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know, there is nothing in v. 3.x of the JavaScript API to generate json for a web map, and it is not a trivial task to do it yourself.&amp;nbsp; It is supposed to be a feature of the 4.0 API, but as of &lt;A href="https://developers.arcgis.com/javascript/beta/guide/limitations/"&gt;Beta 1&lt;/A&gt;, it is not available yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I suspect the PrintTask is generating an Export Web Map, which is slightly different.&amp;nbsp; According to &lt;A href="http://resources.arcgis.com/en/help/arcgis-web-map-json/#/Web_map_format_overview/02qt00000007000000/"&gt;Esri documentation on the ArcGIS web map format&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;"The web map and its specification should not be confused with the ExportWebMap specification, which is used by ArcGIS Server when printing maps. Although you may notice similarities in properties, they are two different specifications."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:32:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148801#M13869</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2015-10-30T18:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap to json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148802#M13870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sebastien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try formatting the item id for your webmap in a request like this with f=pjson. If your map is shared with everyone this should work, otherwise, you'll need to embed a token in the request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.arcgis.com/sharing/content/items/1411783d54104bc98a69fa3f80ae0f1a?f=pjson" title="http://www.arcgis.com/sharing/content/items/1411783d54104bc98a69fa3f80ae0f1a?f=pjson"&gt;http://www.arcgis.com/sharing/content/items/YourWebMapID?f=pjson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148802#M13870</guid>
      <dc:creator>DanielStauning</dc:creator>
      <dc:date>2015-10-30T18:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap to json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148803#M13871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh,that's true.&amp;nbsp; If your web map is already in ArcGIS Online or Portal for ArcGIS, you can export it in json format.&amp;nbsp; If you want to take a JavaScript map object and convert it to json (to be able to save it to AGOL or Portal), there is currently no way that I know of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148803#M13871</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2015-10-30T18:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap to json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148804#M13872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Unfortunately&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;this is not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a solution&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;because I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;added&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;services&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;which was not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;original&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;webmap&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Also, the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;basemap&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;widget&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;lets you change the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;basemap&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;(&lt;/SPAN&gt;different from the one &lt;SPAN class="hps"&gt;in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;online)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/webmap-to-json/m-p/148804#M13872</guid>
      <dc:creator>SebastienPelletier</dc:creator>
      <dc:date>2015-10-30T18:53:54Z</dc:date>
    </item>
  </channel>
</rss>

