<?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 4.0: Is there a way to create a WebMap from JSON instead of ArcGIS Online ID? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65191#M5723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to create a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html"&gt;WebMap&lt;/A&gt; using &lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Web_map_format/02r30000004n000000/"&gt;ArcGIS REST API formatted JSON&lt;/A&gt;? What I would like to do is construct a map using a webmap defined in a JSON file on the same server as the web application rather than getting the JSON from ArcGIS Online (by providing an AGOL item id corresponding to a webmap).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, when you construct a WebMap object by providing an AGOL webmap item id, there must be code in the API that is parsing the returned JSON, but I am not finding any documented way to construct a webmap without hosting the map on ArcGIS Online or on a Portal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2016 20:33:31 GMT</pubDate>
    <dc:creator>JeffJacobson</dc:creator>
    <dc:date>2016-05-13T20:33:31Z</dc:date>
    <item>
      <title>4.0: Is there a way to create a WebMap from JSON instead of ArcGIS Online ID?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65191#M5723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to create a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html"&gt;WebMap&lt;/A&gt; using &lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Web_map_format/02r30000004n000000/"&gt;ArcGIS REST API formatted JSON&lt;/A&gt;? What I would like to do is construct a map using a webmap defined in a JSON file on the same server as the web application rather than getting the JSON from ArcGIS Online (by providing an AGOL item id corresponding to a webmap).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, when you construct a WebMap object by providing an AGOL webmap item id, there must be code in the API that is parsing the returned JSON, but I am not finding any documented way to construct a webmap without hosting the map on ArcGIS Online or on a Portal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 20:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65191#M5723</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2016-05-13T20:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: 4.0: Is there a way to create a WebMap from JSON instead of ArcGIS Online ID?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65192#M5724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first export the Json for your Web map requesting the json with the following url&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/sharing/content/items/4a4d0a1b5c1b4311839fd2c49e27d2b0/data?f=pjson" title="https://www.arcgis.com/sharing/content/items/4a4d0a1b5c1b4311839fd2c49e27d2b0/data?f=pjson"&gt;https://www.arcgis.com/sharing/content/items/4a4d0a1b5c1b4311839fd2c49e27d2b0/data?f=pjson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create webmap parameter&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var webmap = {};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add webmap parameter item tag to host the map title &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; webmap.item = {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title":"Map Title",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "snippet": "web"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add webmap parameter itemData tag to host the JSON data (here place the json downloaded from arcgis online)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;webmap.itemData = {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "operationalLayers": [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F12.18.20.190%3A6080%2Farcgis%2Frest%2Fservices%2Ftoc%2Fms_a%2FMapServer" rel="nofollow" target="_blank"&gt;http://12.18.20.190:6080/arcgis/rest/services/toc/ms_a/MapServer&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "id": "lvn9638",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "visibility": false,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "opacity": 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "layer name"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F192.168.0.19%3A6080%2Farcgis%2Frest%2Fservices%2Ftoc%2Fms_a_x%2FMapServer" rel="nofollow" target="_blank"&gt;http://192.168.0.19:6080/arcgis/rest/services/toc/ms_a_x/MapServer&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "id": "nvvf9234",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "visibility": false,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "opacity": 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "layer name"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...........................&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...........................&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "baseMap": {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "baseMapLayers": [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;{"id":"World_Light_Gray_Base_1486","layerType":"ArcGISTiledMapServiceLayer","opacity":1,"visibility":true,"url":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FCanvas%2FWorld_Light_Gray_Base%2FMapServer" rel="nofollow" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer&lt;/A&gt;&lt;SPAN&gt;"},&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"id":"World_Light_Gray_Reference_4241","layerType":"ArcGISTiledMapServiceLayer","isReference":true,"opacity":1,"visibility":true,"url":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FCanvas%2FWorld_Light_Gray_Reference%2FMapServer" rel="nofollow" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer&lt;/A&gt;&lt;SPAN&gt;"}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "Light Gray"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; },&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "version": "1.9.1",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "modifyMapAllowed": true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add the webmap parameter during the map creation from the createMap function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mapDeferred = esri.arcgis.utils.createMap(webmap, "map", {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mapOptions : {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; slider : true,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; nav : false,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; wrapAround180 : true,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; center: [23, 39],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; lods: lods,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; logo: false,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; showAttribution: false&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; },&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ignorePopups : false,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; geometryServiceURL : app.geometryServ&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; });&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 09:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65192#M5724</guid>
      <dc:creator>PanagiotisPapadopoulos</dc:creator>
      <dc:date>2016-05-16T09:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: 4.0: Is there a way to create a WebMap from JSON instead of ArcGIS Online ID?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65193#M5725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry this is for 3.16 API. &lt;/P&gt;&lt;P&gt;I just noticed you are asking for 4.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 09:40:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65193#M5725</guid>
      <dc:creator>PanagiotisPapadopoulos</dc:creator>
      <dc:date>2016-05-16T09:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: 4.0: Is there a way to create a WebMap from JSON instead of ArcGIS Online ID?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65194#M5726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a (currently) undocumented fromJSON property on the Web Map that you can use to load a web map from json. Here's a code example showing how it works: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsbin.com/cebomuzuco/edit?html,output" title="http://jsbin.com/cebomuzuco/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:19:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-0-is-there-a-way-to-create-a-webmap-from-json/m-p/65194#M5726</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2016-05-19T20:19:18Z</dc:date>
    </item>
  </channel>
</rss>

