<?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: How do I get the ID of a web map layer? in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686594#M856</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brandon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the web map ID -- I'm looking for the ID of specific layer within the web map, so that I can do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var layer = this.map.getLayer(&amp;lt;insert layer ID here&amp;gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, in order to configure the GeoForm template fields, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fields:{
&amp;nbsp; &amp;lt;insert layer ID here&amp;gt;: [{
&amp;nbsp; "name": "email", // field ID
&amp;nbsp; "alias": "Email", // label
&amp;nbsp; "fieldDescription": "Let us contact you.", // help text
&amp;nbsp; "visible": true, // show this field?
&amp;nbsp; "typeField": false, // subtype field?
&amp;nbsp; "tooltip": "test@test.com", // placeholder text
&amp;nbsp; "displayType": "email" // text, checkbox, radio, textarea, url, email
&amp;nbsp; }]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:52:43 GMT</pubDate>
    <dc:creator>JonathanBailey</dc:creator>
    <dc:date>2021-12-12T04:52:43Z</dc:date>
    <item>
      <title>How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686592#M854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For various reasons it's useful to know the ID of a web map layer. So what's the easiest way to find it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've learned by debugging that the ID of one of my web map layers is "Development_2055". How would I find this without debugging?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 13:54:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686592#M854</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2015-08-13T13:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686593#M855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; Sorry Jonathan, I guess I failed the reading comprehension portion of geonet.&amp;nbsp; I thought you meant the map id, not a layer id.&amp;nbsp; My apologies.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two easy ways that I know about: When you save the map and then when you look at the details of the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you save the map the link will change to show the id&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="122237" alt="webmapid2.JPG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/122237_webmapid2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;And then when you look at the details of a map it is also in the browser link&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="122238" alt="webmapid.JPG" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/122238_webmapid.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The id is the same just called a little different in the browser link.&amp;nbsp; Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Brandon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 14:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686593#M855</guid>
      <dc:creator>BrandonKeinath1</dc:creator>
      <dc:date>2015-08-13T14:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686594#M856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brandon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the web map ID -- I'm looking for the ID of specific layer within the web map, so that I can do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var layer = this.map.getLayer(&amp;lt;insert layer ID here&amp;gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, in order to configure the GeoForm template fields, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fields:{
&amp;nbsp; &amp;lt;insert layer ID here&amp;gt;: [{
&amp;nbsp; "name": "email", // field ID
&amp;nbsp; "alias": "Email", // label
&amp;nbsp; "fieldDescription": "Let us contact you.", // help text
&amp;nbsp; "visible": true, // show this field?
&amp;nbsp; "typeField": false, // subtype field?
&amp;nbsp; "tooltip": "test@test.com", // placeholder text
&amp;nbsp; "displayType": "email" // text, checkbox, radio, textarea, url, email
&amp;nbsp; }]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:52:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686594#M856</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2021-12-12T04:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686595#M857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could so something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var map = this.map;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
array.forEach(map.itemInfo.itemData.operationalLayers, function(layer){
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(layer.title == 'Parcels'){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerID = layer.id;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
})&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686595#M857</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-12T04:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686596#M858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, that does work. I'm wondering if there's a way to do it a priori, as in the second case that I identified above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 15:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686596#M858</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2015-08-13T15:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686597#M859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan, you can find the id's of the operationalLayers in the json of your webmap : &lt;/P&gt;&lt;P&gt;&amp;lt;portalurl&amp;gt;/sharing/rest/content/items/&amp;lt;webmapid&amp;gt;/data?f=json&amp;amp;token=&lt;/P&gt;&lt;P&gt;I'm not sure if I would call it an easy way to find them - but it is a way without writing code or debugging&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 14:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686597#M859</guid>
      <dc:creator>HerdisGudbrandsdottir</dc:creator>
      <dc:date>2015-08-24T14:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686598#M860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect. That's exactly what I was looking for. Thanks, Herdis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 13:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686598#M860</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2015-09-04T13:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686599#M861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/6369"&gt;Jonathan Bailey&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Esri has released the ArcGIS Online Assistant app that allows you to view the JSON of an object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link:&amp;nbsp;&lt;A class="link-titled" href="https://ago-assistant.esri.com/" title="https://ago-assistant.esri.com/"&gt;ArcGIS Online Assistant&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To view a webmap's JSON:&lt;/P&gt;&lt;P&gt;1.Login&lt;/P&gt;&lt;P&gt;2. Select the "I want to..." list in the top menu&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="216821" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/216821_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;3. Select "View an Item's JSON" from the list.&lt;/P&gt;&lt;P&gt;4. Select the map or item from the lists on the left of the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had been using the method that &amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/13963"&gt;Herdis Gudbrandsdottir&lt;/A&gt;&amp;nbsp;had posted for a while now and this method seems helpful as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 14:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686599#M861</guid>
      <dc:creator>ChristopherSchreiber</dc:creator>
      <dc:date>2016-08-18T14:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686600#M862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;Take the following steps to get the id of all layers/services in a web map:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;First share the map as &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;public&lt;/EM&gt; &lt;/STRONG&gt;&lt;SPAN style="color: #4c4c4c;"&gt;and then use the following URL&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;https://&amp;lt;your portal url&amp;gt;/sharing/rest/content/items/web map id/data/?f=pjson&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set the share back to its original definition&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 08:02:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/686600#M862</guid>
      <dc:creator>YaronCohen1</dc:creator>
      <dc:date>2019-12-26T08:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the ID of a web map layer?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/1040191#M986</link>
      <description>&lt;P&gt;You can use the following code in Jupyter Notebook to get the ID of the operationalLayers in your Web Map.&lt;/P&gt;&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;gis = GIS("home")&lt;/P&gt;&lt;P&gt;from arcgis.mapping import WebMap&lt;BR /&gt;wm_item = gis.content.get('itemID of the WebMap')&lt;BR /&gt;wm = WebMap(wm_item)&lt;BR /&gt;print(wm.layers[0].id)&lt;/P&gt;&lt;P&gt;This will print Development_2055 in your case if this is the first layer in your Web Map.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 14:28:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-do-i-get-the-id-of-a-web-map-layer/m-p/1040191#M986</guid>
      <dc:creator>IJsbrandGroeneveld</dc:creator>
      <dc:date>2021-03-24T14:28:20Z</dc:date>
    </item>
  </channel>
</rss>

