<?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 to loop through and turn off ALL layers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524065#M48882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Loop through the myApp.mapView.map.layers collection and set the visibility property to false.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;          view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:50:56 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-11T22:50:56Z</dc:date>
    <item>
      <title>How to loop through and turn off ALL layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524064#M48881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 5px; padding: 0px;"&gt;&lt;P style="border: 0px; font-weight: inherit; margin: 0px 0px 1em; padding: 0px;"&gt;The below finds my layer and shows visible property in the console, when I toggle it there from '&lt;CODE style="background-color: var(--black-050); border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;true&lt;/CODE&gt;' or '&lt;CODE style="background-color: var(--black-050); border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;false&lt;/CODE&gt;' it changes.&lt;/P&gt;&lt;PRE class="" style="color: var(--black-800); background-color: var(--black-050); border: 0px; font-weight: inherit; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: var(--black-050); border: 0px; font-weight: inherit; padding: 0px;"&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;myApp&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;mapview&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;findLayerById&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--red-800); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;'cool_layer'&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="border: 0px; font-weight: inherit; margin: 0px 0px 1em; padding: 0px;"&gt;&lt;A href="https://i.stack.imgur.com/JZlya.png" rel="nofollow noreferrer" style="color: #1d4d5c; border: 0px; font-weight: inherit; text-decoration: underline; padding: 0px;"&gt;&lt;IMG alt="enter image description here" src="https://i.stack.imgur.com/JZlya.png" style="border: 0px; font-weight: inherit; padding: 0px;" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit; margin: 0px 0px 1em; padding: 0px;"&gt;But when I run the below line, I can toggle my layers on or off individually, but how could I loop through all of them, and turn them all off? I am trying tocreate a 'reset' button.&lt;/P&gt;&lt;PRE class="" style="color: var(--black-800); background-color: var(--black-050); border: 0px; font-weight: inherit; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: var(--black-050); border: 0px; font-weight: inherit; padding: 0px;"&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;myApp&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;mapview&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;findLayerById&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--red-800); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;'cool_layer'&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;).&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;visible &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--blue-800); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;true&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px; padding: 0px;"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #242729; background-color: #f9f8f6; border: 0px; margin: -2px 0px 10px; padding: 0px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; font-size: 13px; margin: 2px 0px; padding: 0px;"&gt;&lt;A class="" href="https://gis.stackexchange.com/questions/tagged/javascript" rel="tag" style="color: #696969; background-color: #f5f5f5; border: 1px solid #e0e0e0; font-weight: inherit; text-decoration: none; font-size: 12px; margin: 2px 2px 2px 0px; padding: 0.4em 0.5em;" title="show questions tagged 'javascript'"&gt;javascript&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://gis.stackexchange.com/questions/tagged/arcgis-javascript-api" rel="tag" style="color: #696969; background-color: #f5f5f5; border: 1px solid #e0e0e0; font-weight: inherit; text-decoration: none; font-size: 12px; margin: 2px 2px 2px 0px; padding: 0.4em 0.5em;" title="show questions tagged 'arcgis-javascript-api'"&gt;arcgis-javascript-api&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://gis.stackexchange.com/questions/tagged/arcgis-javascript-api-4" rel="tag" style="color: #696969; background-color: #f5f5f5; border: 1px solid #e0e0e0; font-weight: inherit; text-decoration: none; font-size: 12px; margin: 2px 2px 2px 0px; padding: 0.4em 0.5em;" title="show questions tagged 'arcgis-javascript-api-4'"&gt;arcgis-javascript-api-4&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 0px !important 0px; padding: 0px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; font-size: 13px; margin: 16px !important 0px -4px 0px; padding: 4px !important 0px 0px 0px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; font-size: 13px; margin: 4px 0px; padding: 0px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; font-size: 13px; padding: 2px 0px 0px;"&gt;&lt;A class="" data-action=" s-popover#toggle se-share-sheet#preventNavigation s-popover:show-&amp;gt;se-share-sheet#willShow s-popover:shown-&amp;gt;se-share-sheet#didShow" data-controller="se-share-sheet s-popover" data-gps-track="post.click({ item: 2, priv: 5, post_type: 1 })" data-s-popover-placement="bottom-start" data-se-share-sheet-location="1" data-se-share-sheet-post-type="question" data-se-share-sheet-social="facebook twitter " data-se-share-sheet-subtitle="(includes your user id)" data-se-share-sheet-title="Share a link to this question" href="https://gis.stackexchange.com/q/353131/155649" rel="nofollow" style="margin: 0px; padding: 0px 4px 2px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 13px; vertical-align: baseline; box-sizing: inherit; text-decoration: none; color: #848d95; cursor: pointer; display: inline-block;" title="short permalink to this question"&gt;share&lt;/A&gt;&lt;SPAN class="" style="color: #1b4072; border: 0px; font-weight: inherit; font-size: 1px; padding: 0px;"&gt;&lt;/SPAN&gt;&lt;A class="" data-gps-track="post.click({ item: 6, priv: 5, post_type: 1 })" href="https://gis.stackexchange.com/posts/353131/edit" style="color: #848d95; border: 0px; font-weight: inherit; text-decoration: none; font-size: 13px; padding: 0px 4px 2px;" title="revise and improve this post"&gt;edit&lt;/A&gt;&lt;SPAN class="" style="color: #1b4072; border: 0px; font-weight: inherit; font-size: 1px; padding: 0px;"&gt;&lt;/SPAN&gt;&lt;A class="" data-delete-prompt="Delete this post?" data-gps-track="post.click({ item: 8, priv: 5, post_type: 1 })" data-undelete-prompt="Undelete this post?" href="https://gis.stackexchange.com/questions/353131/possible-to-loop-through-and-turn-off-all-layers" style="color: #848d95; border: 0px; font-weight: inherit; text-decoration: none; font-size: 13px; padding: 0px 4px 2px;" title="vote to delete this post"&gt;delete&lt;/A&gt;&lt;SPAN class="" style="color: #1b4072; border: 0px; font-weight: inherit; font-size: 1px; padding: 0px;"&gt;&lt;/SPAN&gt;&lt;A class="" data-gps-track="post.click({ item: 5, priv: 5, post_type: 1 })" data-postid="353131" href="https://gis.stackexchange.com/questions/353131/possible-to-loop-through-and-turn-off-all-layers" style="color: #848d95; border: 0px; font-weight: inherit; text-decoration: none; font-size: 13px; padding: 0px 4px 2px;" title="flag this post for serious problems or moderator attention"&gt;flag&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524064#M48881</guid>
      <dc:creator>CamCode</dc:creator>
      <dc:date>2020-03-05T20:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through and turn off ALL layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524065#M48882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Loop through the myApp.mapView.map.layers collection and set the visibility property to false.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;          view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:50:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524065#M48882</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T22:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through and turn off ALL layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524066#M48883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert, any idea on how to do something similar with all my filtering? How could I programatically find the following in the console, similar to how I am searching my layers: i.e.&amp;nbsp;&lt;STRONG style="background-color: #f8f8f8; color: #595959; "&gt;featureLayerView.filter &lt;/STRONG&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;i.e&lt;/EM&gt;&lt;STRONG style="background-color: #f8f8f8; color: #595959; "&gt;.&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html"&gt;FeatureFilter | ArcGIS API for JavaScript 4.14&lt;/A&gt;&amp;nbsp;- &lt;/STRONG&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;I can't find this in the console with the similar&amp;nbsp;syntax i.e. below&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 5px;"&gt;&lt;PRE class="" style="color: var(--black-800); background-color: var(--black-050); border: 0px; font-weight: inherit; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: var(--black-050); border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;myApp&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;mapview&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;findLayerById&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--red-800); border: 0px; font-weight: inherit; font-size: 13px;"&gt;'cool_layer'&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;).&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;visible &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--blue-800); border: 0px; font-weight: inherit; font-size: 13px;"&gt;true&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2020 01:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524066#M48883</guid>
      <dc:creator>CamCode</dc:creator>
      <dc:date>2020-03-06T01:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through and turn off ALL layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524067#M48884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Your issue is that the id of the layer is not the layer name normally it is something like:&lt;/P&gt;&lt;P&gt;view.map.findLayerById("Hazards_Uptown_Charlotte_665").visible = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not know the exact layer id then you first have to loop through the maps layers and check the layers title or name to see if it matches 'cool layer' and get that layers actual id.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2020 14:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-loop-through-and-turn-off-all-layers/m-p/524067#M48884</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-03-06T14:02:11Z</dc:date>
    </item>
  </channel>
</rss>

