<?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 problem with view.map.allLayers? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-view-map-alllayers/m-p/1272616#M80680</link>
    <description>&lt;P&gt;I am using a webmap in my mapview.&amp;nbsp; Once the view is ready (i.e. after view.when()), I do the following to produce the output on the right in the image below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;let&lt;/SPAN&gt; &lt;SPAN&gt;layers&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;allLayers&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"layers.length = "&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;layers&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;length&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;l&lt;/SPAN&gt; &lt;SPAN&gt;of&lt;/SPAN&gt; &lt;SPAN&gt;layers&lt;/SPAN&gt;&lt;SPAN&gt;){&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;l&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;title&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; - (&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;l&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;)`&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;For comparison, the table of contents for the webmap that I'm using is shown on the left side of the image below.&amp;nbsp; The problem I'm having is that the '2020-2029 STIP Points' and the '2020-2029 STIP Lines' layers are not showing up in the output.&amp;nbsp; In the output the group shows up as a map image but the layers underneath are feature layers.&amp;nbsp; Could it be because the layers begin with numbers?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 946px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66543iDE0940A10E28D9B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 28 Mar 2023 17:58:43 GMT</pubDate>
    <dc:creator>GaryB</dc:creator>
    <dc:date>2023-03-28T17:58:43Z</dc:date>
    <item>
      <title>problem with view.map.allLayers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-view-map-alllayers/m-p/1272616#M80680</link>
      <description>&lt;P&gt;I am using a webmap in my mapview.&amp;nbsp; Once the view is ready (i.e. after view.when()), I do the following to produce the output on the right in the image below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;let&lt;/SPAN&gt; &lt;SPAN&gt;layers&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;allLayers&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;console&lt;/SPAN&gt;&lt;S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/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;For comparison, the table of contents for the webmap that I'm using is shown on the left side of the image below.&amp;nbsp; The problem I'm having is that the '2020-2029 STIP Points' and the '2020-2029 STIP Lines' layers are not showing up in the output.&amp;nbsp; In the output the group shows up as a map image but the layers underneath are feature layers.&amp;nbsp; Could it be because the layers begin with numbers?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 946px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66543iDE0940A10E28D9B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Mar 2023 17:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-view-map-alllayers/m-p/1272616#M80680</guid>
      <dc:creator>GaryB</dc:creator>
      <dc:date>2023-03-28T17:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: problem with view.map.allLayers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-view-map-alllayers/m-p/1272834#M80685</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#allLayers" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#allLayers&lt;/A&gt;&amp;nbsp;- according to the document, allLayers&lt;SPAN&gt;&amp;nbsp;collection contains&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap" target="_blank"&gt;basemap layers&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers" target="_blank"&gt;operational layers&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground" target="_blank"&gt;ground layers&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html" target="_blank"&gt;Group Layers&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and their&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html#layers" target="_blank"&gt;children layers&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;are also part of this collection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So for MapImageLayer you'd have to use&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#allSublayers" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#allSublayers&lt;/A&gt;&amp;nbsp;to get its sublayers. Same thing goes for TileLayer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 22:57:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-view-map-alllayers/m-p/1272834#M80685</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-03-28T22:57:18Z</dc:date>
    </item>
  </channel>
</rss>

