<?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 How to set visibility of a layer by code in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-visibility-of-a-layer-by-code/m-p/729515#M67666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been tasked to create a method to store current checkbox values. I'm using loaclStorage and I can retrieve:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the LayerID, the info.id, and if the layer/sublayer was checked visible. As I'm reading each item from localStorage, I'd like to set the visibility for the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example I've stored the layer "Basemap", and the SubLayer is Roads (Index# 2) and the visible value was False.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a code like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.getLayer(Basemap).layerInfos(2).setVisibility(false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That would work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2014 14:15:33 GMT</pubDate>
    <dc:creator>BillChappell</dc:creator>
    <dc:date>2014-06-18T14:15:33Z</dc:date>
    <item>
      <title>How to set visibility of a layer by code</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-visibility-of-a-layer-by-code/m-p/729515#M67666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been tasked to create a method to store current checkbox values. I'm using loaclStorage and I can retrieve:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the LayerID, the info.id, and if the layer/sublayer was checked visible. As I'm reading each item from localStorage, I'd like to set the visibility for the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example I've stored the layer "Basemap", and the SubLayer is Roads (Index# 2) and the visible value was False.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a code like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.getLayer(Basemap).layerInfos(2).setVisibility(false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That would work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 14:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-visibility-of-a-layer-by-code/m-p/729515#M67666</guid>
      <dc:creator>BillChappell</dc:creator>
      <dc:date>2014-06-18T14:15:33Z</dc:date>
    </item>
  </channel>
</rss>

