<?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 Layer list wouldn't update visibility when check box clicked in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377651#M35012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm very new to Javascript and making slow, steady progress.&amp;nbsp; Still figuring it out.&amp;nbsp; I got the layer list to draw in a tab to the left, but the updatelayervisibility function apparently isn't firing when I click a check box.&amp;nbsp; This could be something very simple, but I can't find it.&amp;nbsp; Thanks for any help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2012 20:50:42 GMT</pubDate>
    <dc:creator>DavidBoyd</dc:creator>
    <dc:date>2012-10-15T20:50:42Z</dc:date>
    <item>
      <title>Layer list wouldn't update visibility when check box clicked</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377651#M35012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm very new to Javascript and making slow, steady progress.&amp;nbsp; Still figuring it out.&amp;nbsp; I got the layer list to draw in a tab to the left, but the updatelayervisibility function apparently isn't firing when I click a check box.&amp;nbsp; This could be something very simple, but I can't find it.&amp;nbsp; Thanks for any help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 20:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377651#M35012</guid>
      <dc:creator>DavidBoyd</dc:creator>
      <dc:date>2012-10-15T20:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Layer list wouldn't update visibility when check box clicked</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377652#M35013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;there is a spelling error early in your code. This may or may not be the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;var landsResults, riversResutls;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is spelled correctly when you reference it later in the code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 13:41:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377652#M35013</guid>
      <dc:creator>CraigMcDade</dc:creator>
      <dc:date>2012-10-16T13:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Layer list wouldn't update visibility when check box clicked</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377653#M35014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your "vop" object isn't in scope inside your "updateLayerVisibility" function, so this will fail:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;vop.setVisibleLayers(visible);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you've hard-coded the Id of your vop layer here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var vop = new&amp;nbsp; esri.layers.ArcGISDynamicMapServiceLayer( &amp;nbsp;&amp;nbsp;&amp;nbsp; "http://dswcapps.dcr.virginia.gov/ArcGIS/rest/services/dnh/vop/MapServer", &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 'vop', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opacity: 0.45 &amp;nbsp;&amp;nbsp;&amp;nbsp; } );&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;....one quick way you could get a reference to the layer is to replace that broken line with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; map.getLayer("vop").setVisibleLayers(visible);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 14:30:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377653#M35014</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-10-16T14:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Layer list wouldn't update visibility when check box clicked</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377654#M35015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Problem solved, and I learned something too.&amp;nbsp; Thanks to both of you!!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-wouldn-t-update-visibility-when-check/m-p/377654#M35015</guid>
      <dc:creator>DavidBoyd</dc:creator>
      <dc:date>2012-10-17T20:00:13Z</dc:date>
    </item>
  </channel>
</rss>

