<?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 Toggle div Visibility for Visible Layers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/toggle-div-visibility-for-visible-layers/m-p/304982#M28004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to toggle the visibility of a particular div container when certain layers are visible.&amp;nbsp; I am using the table of contents widget to toggle layer visibility from the following link:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; I have the identify task working properly for the visible layers using the following code and I think that I need to do something similar to get the visible layer name, however, I cannot seem to modify it to work for toggling the div visibility:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function(response){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dojo.map(response, function(result){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature=result.feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.layerName = result.layerName; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var template = new esri.InfoTemplate("${Name}", "${*}"); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(template); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); }); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([deferred]); map.infoWindow.show(evt.mapPoint);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone please provide guidance on how I can go about this?&amp;nbsp; Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2014 12:44:52 GMT</pubDate>
    <dc:creator>WesAskew</dc:creator>
    <dc:date>2014-03-13T12:44:52Z</dc:date>
    <item>
      <title>Toggle div Visibility for Visible Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/toggle-div-visibility-for-visible-layers/m-p/304982#M28004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to toggle the visibility of a particular div container when certain layers are visible.&amp;nbsp; I am using the table of contents widget to toggle layer visibility from the following link:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; I have the identify task working properly for the visible layers using the following code and I think that I need to do something similar to get the visible layer name, however, I cannot seem to modify it to work for toggling the div visibility:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function(response){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dojo.map(response, function(result){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature=result.feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.layerName = result.layerName; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var template = new esri.InfoTemplate("${Name}", "${*}"); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(template); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); }); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([deferred]); map.infoWindow.show(evt.mapPoint);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone please provide guidance on how I can go about this?&amp;nbsp; Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 12:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/toggle-div-visibility-for-visible-layers/m-p/304982#M28004</guid>
      <dc:creator>WesAskew</dc:creator>
      <dc:date>2014-03-13T12:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle div Visibility for Visible Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/toggle-div-visibility-for-visible-layers/m-p/304983#M28005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am trying to toggle the visibility of a particular div container when certain layers are visible.&amp;nbsp; I am using the table of contents widget to toggle layer visibility from the following link:&amp;nbsp; &lt;A class="jive-link-external-small" href="http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109&lt;/A&gt;.&amp;nbsp; I have the identify task working properly for the visible layers using the following code and I think that I need to do something similar to get the visible layer name, however, I cannot seem to modify it to work for toggling the div visibility:&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function(response){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dojo.map(response, function(result){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature=result.feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.layerName = result.layerName; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var template = new esri.InfoTemplate("${Name}", "${*}"); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(template); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); }); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([deferred]); map.infoWindow.show(evt.mapPoint);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Could someone please provide guidance on how I can go about this?&amp;nbsp; Thanks in advance.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (layer.visibleLayers =='layerid'){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; dojo.byId("dib").style.display = 'none';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 15:43:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/toggle-div-visibility-for-visible-layers/m-p/304983#M28005</guid>
      <dc:creator>WesleyAskew</dc:creator>
      <dc:date>2014-03-25T15:43:25Z</dc:date>
    </item>
  </channel>
</rss>

