<?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: Is it possible to only Identify on layers that I have in an array in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420062#M38588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IdentifyParameters has the property &lt;/SPAN&gt;&lt;A href="http://developers.arcgis.com/en/javascript/jsapi/identifyparameters.html#layerids"&gt;layerIds&lt;/A&gt;&lt;SPAN&gt;, where you can set the layers that the are used in the task.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 May 2013 20:23:21 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2013-05-28T20:23:21Z</dc:date>
    <item>
      <title>Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420061#M38587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been using the Identify tool with&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; idParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, I do not want some of those "visible" layers identified when a user clicks.&amp;nbsp; Is it possible to use an array of layer names that I already have built so that only those are displayed in the popup?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Luci&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 19:36:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420061#M38587</guid>
      <dc:creator>LuciHawkins</dc:creator>
      <dc:date>2013-05-28T19:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420062#M38588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IdentifyParameters has the property &lt;/SPAN&gt;&lt;A href="http://developers.arcgis.com/en/javascript/jsapi/identifyparameters.html#layerids"&gt;layerIds&lt;/A&gt;&lt;SPAN&gt;, where you can set the layers that the are used in the task.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420062#M38588</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-05-28T20:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420063#M38589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This sample may help you....&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/find_drilldown.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/find_drilldown.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2013 02:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420063#M38589</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-29T02:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420064#M38590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I saw those and they would work if my layers were all in 1 map service.&amp;nbsp; I have over 10 different map services that I need to provide popup information for.&amp;nbsp; The problem is my identify tool returns a popup for map services that I do not want to show information for.&amp;nbsp; For example, I do not want popups for my city limits, hydrography, roadways, etc. but since they are visible they are selected when I use LAYER_OPTION_VISIBLE.&amp;nbsp; I want to filter the results from LAYER_OPTION_VISIBLE against an array I have of layer names.&amp;nbsp; Only those that are in my array should show up in a popup if they are visible.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a noob and hack at best so any help would be greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Luci&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2013 13:30:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420064#M38590</guid>
      <dc:creator>LuciHawkins</dc:creator>
      <dc:date>2013-05-29T13:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420065#M38591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your loop where your executing each task, why not set the layerIds parameter of idParams for each of the tasks? You could use another array (visibleLayers) where you have stored the visible layers for each layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ( i = 0; i &amp;lt; tasks.length; i++) {//Use 'for' instead of 'for...in' so you can sync tasks with defTasks
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color:#ff0000;"&gt;idParams.layerIds = visibleLayers&lt;I&gt;&lt;/I&gt;&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tasks&lt;I&gt;.execute(idParams, defTasks&lt;I&gt;.callback, defTasks&lt;I&gt;.errback);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Execute each task
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (e) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("Error caught");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(e);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; defTasks&lt;I&gt;.errback(e);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If you get an error for any task, execute the errback
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:58:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420065#M38591</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T18:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420066#M38592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an array built (identLayers) with the layerNames of all of the layers from the 10 or more map services that I want people to be able to query popup information for. I need to be able to take the results of the map click and only produce the popup for the layers that are visible AND whose layerName appears in the array. I tried plugging it into the statement that you added below and it did not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; for ( i = 0; i &amp;lt; tasks.length; i++) {//Use 'for' instead of 'for...in' so you can sync tasks with defTasks&amp;nbsp; &lt;BR /&gt; try {&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;idParams.layerIds = identLayers&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt; &lt;BR /&gt; tasks&lt;I&gt;.execute(idParams, defTasks&lt;I&gt;.callback, defTasks&lt;I&gt;.errback);&amp;nbsp; &lt;BR /&gt; //Execute each task&amp;nbsp; &lt;BR /&gt; } catch (e) {&amp;nbsp; &lt;BR /&gt; console.log("Error caught");&amp;nbsp; &lt;BR /&gt; console.log(e);&amp;nbsp; &lt;BR /&gt; defTasks&lt;I&gt;.errback(e);&amp;nbsp; &lt;BR /&gt; //If you get an error for any task, execute the errback&amp;nbsp; &lt;BR /&gt; }&amp;nbsp; &lt;BR /&gt; }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is part of my array code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; function addIdentMaps() {&amp;nbsp; &lt;BR /&gt; //push layers to identify array&amp;nbsp; &lt;BR /&gt; identLayers.push({&amp;nbsp; &lt;BR /&gt; layerName : 'DEEDS'&amp;nbsp; &lt;BR /&gt; });&amp;nbsp; &lt;BR /&gt; identLayers.push({&amp;nbsp; &lt;BR /&gt; layerName : 'Parcels'&amp;nbsp; &lt;BR /&gt; });&amp;nbsp; &lt;BR /&gt; identLayers.push({&amp;nbsp; &lt;BR /&gt; layerName : 'ORDINANCES'&amp;nbsp; &lt;BR /&gt; });&amp;nbsp; &lt;BR /&gt; identLayers.push({&amp;nbsp; &lt;BR /&gt; layerName : 'RESOLUTIONS'&amp;nbsp; &lt;BR /&gt; });&amp;nbsp; &lt;BR /&gt; identLayers.push({&amp;nbsp; &lt;BR /&gt; layerName : 'EASEMENT_Disclaimer'&amp;nbsp; &lt;BR /&gt; });&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Thanks! Luci&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 13:13:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420066#M38592</guid>
      <dc:creator>LuciHawkins</dc:creator>
      <dc:date>2013-05-30T13:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420067#M38593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The layerIds property is expecting a array of numbers, like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#FF0000;"&gt;idParams.layerIds = [0,1,5,9];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of using identLayers, you'll have to build an array that holds the layers you want to show in your popup for each map service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 14:09:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420067#M38593</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-05-30T14:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420068#M38594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was using layerName because I couldnt figure out how to distinguish between layer DEEDS which is 0 in mapservice1 and layer Parcels which is 0 is mapservice2?&amp;nbsp; My array using just the layerIds would look like:&amp;nbsp; [0,1,0,1,0,2,0,1,2,3,4,0,1,2,3,4,5]; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&amp;nbsp; Luci&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 14:28:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420068#M38594</guid>
      <dc:creator>LuciHawkins</dc:creator>
      <dc:date>2013-05-30T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420069#M38595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Remember, though, that you're executing an IdentifyTask for each individual map service. If you simply wanted to get the visible layers for each service, you could use this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var visLayers = dojo.map(layers, function (layer) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; return layer.visibleLayers;
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but that would give you more layers than you want, I suspect. Instead, you'd cycle through each service and add the visible layers for that specific service, so you'd have something like &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; visibleLayers = {[0,1],[0,1],[0,2],[0,1,2,3,4],[0,1,2,3,4,5]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These would have to be in the same order as the tasks, so you could use the line &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;idParams.layerIds = visibleLayers&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:58:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420069#M38595</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T18:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to only Identify on layers that I have in an array</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420070#M38596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible for you to put all the data in your 10 mapservices into 1 mapservice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2016 17:58:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-only-identify-on-layers-that-i/m-p/420070#M38596</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2016-01-27T17:58:42Z</dc:date>
    </item>
  </channel>
</rss>

