<?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 identifyTask filter by TOC visibility? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584125#M54596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've searched the forums, but can't find anything recent regarding this topic. Is there an easy/convenient way to filter the identifyTask by layers that are toggled on or off in the Table of Contents?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Nov 2016 19:45:27 GMT</pubDate>
    <dc:creator>BenCamp</dc:creator>
    <dc:date>2016-11-29T19:45:27Z</dc:date>
    <item>
      <title>identifyTask filter by TOC visibility?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584125#M54596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've searched the forums, but can't find anything recent regarding this topic. Is there an easy/convenient way to filter the identifyTask by layers that are toggled on or off in the Table of Contents?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 19:45:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584125#M54596</guid>
      <dc:creator>BenCamp</dc:creator>
      <dc:date>2016-11-29T19:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: identifyTask filter by TOC visibility?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584126#M54597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just set the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/identifyparameters-amd.html#layeroption" rel="nofollow noopener noreferrer" target="_blank"&gt;layerOption &lt;/A&gt;method of the IdentifyParameters to IdentifyParameters.LAYER_OPTION_VISIBLE. This might be overkill, but I also set the layerIds option to the visibleLayers of the layer I'm running the task on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; idParams &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;IdentifyParameters&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;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapExtent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerOption &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; IdentifyParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LAYER_OPTION_VISIBLE&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerIds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visibleLayers&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tolerance &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;returnGeometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
idParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:06:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584126#M54597</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-12T01:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: identifyTask filter by TOC visibility?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584127#M54598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, and I apologize if I am using the incorrect terminology. I want to be able to toggle visibility on and off within the application and only identify those layers which are currently toggled on.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 21:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584127#M54598</guid>
      <dc:creator>BenCamp</dc:creator>
      <dc:date>2016-11-29T21:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: identifyTask filter by TOC visibility?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584128#M54599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I do in my application. Here's one version of it: &lt;A class="link-titled" href="https://maps.coastalscience.noaa.gov/biomapper/biomapper.html?id=prne" title="https://maps.coastalscience.noaa.gov/biomapper/biomapper.html?id=prne"&gt;NCCOS BIOmapper&lt;/A&gt; Notice as you turn on different layers, only those will be shown in the popup window IdentifyTask.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 21:17:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584128#M54599</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-11-29T21:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: identifyTask filter by TOC visibility?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584129#M54600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. I ended up writing a new function that fires when the layer check box changes state. The function then updates an array, which is then passed on to the identify function to limit the layers identified to only those which are toggled on (checkbox is checked).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-filter-by-toc-visibility/m-p/584129#M54600</guid>
      <dc:creator>BenCamp</dc:creator>
      <dc:date>2016-12-01T19:15:59Z</dc:date>
    </item>
  </channel>
</rss>

