<?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 Determine a Layers index in the map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/determine-a-layers-index-in-the-map/m-p/52731#M4652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm reordering some layers &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;map.reorderLayer(id,index);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; and that's working flawlessly, but I'd like to query against the map object to review the layer order. I see in this method that there is an index associated with the layer id, which leads me to believe I can determine the order of the layers at anytime. &lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Question: Is there a method to determine a particular layer's order or a property in the map object I could use?&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2014 15:04:26 GMT</pubDate>
    <dc:creator>NigelAlford</dc:creator>
    <dc:date>2014-06-05T15:04:26Z</dc:date>
    <item>
      <title>Determine a Layers index in the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/determine-a-layers-index-in-the-map/m-p/52731#M4652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm reordering some layers &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;map.reorderLayer(id,index);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; and that's working flawlessly, but I'd like to query against the map object to review the layer order. I see in this method that there is an index associated with the layer id, which leads me to believe I can determine the order of the layers at anytime. &lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Question: Is there a method to determine a particular layer's order or a property in the map object I could use?&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 15:04:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/determine-a-layers-index-in-the-map/m-p/52731#M4652</guid>
      <dc:creator>NigelAlford</dc:creator>
      <dc:date>2014-06-05T15:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Determine a Layers index in the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/determine-a-layers-index-in-the-map/m-p/52732#M4653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Based on some preliminary testing, using this will give you the list of layers, in order. One caveat is that this will include the base layer(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for (var j = 0; j &amp;lt; map.layerIds.length; j++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var layer = map.getLayer(map.layerIds&lt;J&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(layer.id + ' ' + layer.opacity + ' ' + layer.visible);
}&lt;/J&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/determine-a-layers-index-in-the-map/m-p/52732#M4653</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-10T22:01:54Z</dc:date>
    </item>
  </channel>
</rss>

