<?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 Identify The Name of a Layer ID in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157753#M14728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have found videos to save time in explaining. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed they do! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad I could help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2012 22:20:58 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2012-01-27T22:20:58Z</dc:date>
    <item>
      <title>How Do I Identify The Name of a Layer ID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157750#M14725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to evaluate the name of a layer like I did in the Web ADF, but I can't seem to find code similar to that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a URL with a screen recording of my question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://youtu.be/WkR4VBjx2_s" rel="nofollow" target="_blank"&gt;http://youtu.be/WkR4VBjx2_s&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris S.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 21:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157750#M14725</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2012-01-23T21:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Identify The Name of a Layer ID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157751#M14726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're setting up a query task against a layer that's in a map service you've already added to your JS API map, you can use the map service's &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm#layerInfos" rel="nofollow" target="_blank"&gt;layerInfos&lt;/A&gt;&lt;SPAN&gt; to loop through and match a name to an id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise, use &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_esri.htm#request" rel="nofollow" target="_blank"&gt;esri.request()&lt;/A&gt;&lt;SPAN&gt; to make a call to your map service endpoint. The JSON that comes back will have a layers property. Layers is an array of objects where each object corresponds to a layer in the map service. Every layer object will have an id and a name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And thank you for the video- wish more people would do that :).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 21:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157751#M14726</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-23T21:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Identify The Name of a Layer ID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157752#M14727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you're setting up a query task against a layer that's in a map service you've already added to your JS API map, you can use the map service's &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm#layerInfos"&gt;layerInfos&lt;/A&gt; to loop through and match a name to an id.&lt;BR /&gt;&lt;BR /&gt;Otherwise, use &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_esri.htm#request"&gt;esri.request()&lt;/A&gt; to make a call to your map service endpoint. The JSON that comes back will have a layers property. Layers is an array of objects where each object corresponds to a layer in the map service. Every layer object will have an id and a name. &lt;BR /&gt;&lt;BR /&gt;And thank you for the video- wish more people would do that :).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Derek. This works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a line of code with my alert: alert(dynamicMapServiceLayer.layerInfos[4].name);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have found videos to save time in explaining. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 20:04:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157752#M14727</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2012-01-27T20:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Identify The Name of a Layer ID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157753#M14728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have found videos to save time in explaining. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed they do! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad I could help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 22:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-identify-the-name-of-a-layer-id/m-p/157753#M14728</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-27T22:20:58Z</dc:date>
    </item>
  </channel>
</rss>

