<?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: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344871#M31827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Many thanks - so reported over 3 years ago!!&amp;nbsp; So, I don't think I'll hold my breath for a fix anytime soon.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know if this is fixed in 3.6?&amp;nbsp; (I am on lower API for a while longer).&amp;nbsp; Or if ESRI can comment whether it will be fixed?&amp;nbsp; NIM is still open.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My suggestion would be for ESRI to include a sample that is an Identify widget that identifies all visible layers and works well with AGS JS TOC with dynamic layers with many cascading groups with hundreds of layers, as well as consider including AGS JS TOC in the API itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2013 16:15:32 GMT</pubDate>
    <dc:creator>KevinMacLeod1</dc:creator>
    <dc:date>2013-09-04T16:15:32Z</dc:date>
    <item>
      <title>IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344855#M31811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've used both the create layer list and the identify pop-up samples to create the following code (see first reply)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I turn of a layer in the layerlist it still is identified. How do i stop this from happening?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 17:36:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344855#M31811</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2012-02-03T17:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344856#M31812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;nbsp; &amp;lt;head&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on iOS devices--&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Rijk van Dommel en Aa&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/soria/soria.css"&amp;gt;
 &amp;lt;link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/esri/dijit/css/Popup.css"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style type="text/css"&amp;gt; 
&amp;nbsp; html, body { 
&amp;nbsp;&amp;nbsp; height: 100%; width: 100%; margin: 0; padding: 0;&amp;nbsp; 
&amp;nbsp; } 
&amp;nbsp; body{ 
&amp;nbsp;&amp;nbsp; background-color:#FFF; overflow:hidden; font-family: "Trebuchet MS"; 
&amp;nbsp; }&amp;nbsp; 
&amp;nbsp; #map{ 
&amp;nbsp;&amp;nbsp; overflow:hidden; 
&amp;nbsp;&amp;nbsp; padding:0; 
&amp;nbsp; }
&amp;nbsp; #layerlist{
&amp;nbsp;&amp;nbsp; background-color: #FFF;
&amp;nbsp;&amp;nbsp; padding: 5px;
&amp;nbsp;&amp;nbsp; border: solid 1px #769dc0;
&amp;nbsp; }
&amp;nbsp; a:link {
&amp;nbsp;&amp;nbsp; color: #009FB4;
&amp;nbsp;&amp;nbsp; text-decoration: none;
&amp;nbsp; }
&amp;nbsp; a:visited {
&amp;nbsp;&amp;nbsp; text-decoration: none;
&amp;nbsp;&amp;nbsp; color: #009FB4;
&amp;nbsp; }
&amp;nbsp; a:hover {
&amp;nbsp;&amp;nbsp; text-decoration: underline;
&amp;nbsp;&amp;nbsp; color: #009FB4;
&amp;nbsp; }
&amp;nbsp; a:active {
&amp;nbsp;&amp;nbsp; text-decoration: none;
&amp;nbsp;&amp;nbsp; color: #009FB4;
&amp;nbsp; }
&amp;nbsp; #info {
&amp;nbsp;&amp;nbsp; color:#F00;
&amp;nbsp; }
&amp;nbsp; 
&amp;nbsp; /*Opmaak Popup Window*/

&amp;nbsp; .esriPopup.myTheme .sizer {
&amp;nbsp;&amp;nbsp; width: 400px;
&amp;nbsp; }
&amp;nbsp; 
&amp;nbsp; .esriPopup.myTheme .titlePane,
&amp;nbsp; .dj_ie7 .esriPopup.myTheme .titlePane .title {
&amp;nbsp;&amp;nbsp; background-color: #b7dafb; /*Achtergrondkleur titel*/
&amp;nbsp;&amp;nbsp; color:#4a4a4a; /*Textkleur titel*/
&amp;nbsp;&amp;nbsp; font-weight:700; /*dikte letters*/
&amp;nbsp;&amp;nbsp; z-index:100;
&amp;nbsp; }

&amp;nbsp; .esriPopup.myTheme .titlePane {
&amp;nbsp;&amp;nbsp; border:1px solid #769dc0; /*kleur border titel*/
&amp;nbsp;&amp;nbsp; z-index: 100;
&amp;nbsp; }

&amp;nbsp; .esriPopup.myTheme a {
&amp;nbsp;&amp;nbsp; color:#0095aa; /*kleur van de hyperlinks*/
&amp;nbsp;&amp;nbsp; z-index:100;
&amp;nbsp; }

&amp;nbsp; .esriPopup.myTheme .titleButton,
&amp;nbsp; .esriPopup.myTheme .pointer,
&amp;nbsp; .esriPopup.myTheme .outerPointer,
&amp;nbsp; .esriPopup.myTheme .esriViewPopup .gallery&amp;nbsp;&amp;nbsp; .mediaHandle,
&amp;nbsp; .esriPopup.myTheme .esriViewPopup .gallery .mediaIcon {
&amp;nbsp;&amp;nbsp; background-image:url(images/popup_sprite.png); /*afbeelding met de opmaak van de popup*/
&amp;nbsp;&amp;nbsp; z-index:100;
&amp;nbsp; }

&amp;nbsp; .esriPopup.myTheme .contentPane,.esriPopup.myTheme&amp;nbsp;&amp;nbsp; .actionsPane {
&amp;nbsp;&amp;nbsp; background-color:#ffffff; /*Achtergrondkleur inhoud*/
&amp;nbsp;&amp;nbsp; color:#000000;/*Tekstkleur inhoud*/
&amp;nbsp;&amp;nbsp; border-left:1px solid #769dc0;/*border links kleur inhoud*/
&amp;nbsp;&amp;nbsp; border-right:1px solid #769dc0;/*border rechts kleur inhoud*/
&amp;nbsp;&amp;nbsp; z-index:100;
&amp;nbsp; }
&amp;nbsp; 
&amp;nbsp; /*.esriPopup.myTheme{
&amp;nbsp;&amp;nbsp; border-bottom: 1px solid #769dc0; /*border onder kleur inhoud*/
&amp;nbsp;&amp;nbsp; z-index:100;
&amp;nbsp; }*/
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:14:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344856#M31812</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2021-12-11T16:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344857#M31813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;part two of the code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;script type="text/javascript"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var djConfig = { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parseOnLoad: true 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript"&amp;gt;
&amp;nbsp;&amp;nbsp; dojo.require("dijit.dijit"); // optimize: load dijit layer 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("dijit.layout.BorderContainer"); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("dijit.layout.ContentPane");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.map");
&amp;nbsp;&amp;nbsp; dojo.require("esri.dijit.Popup");

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layer, map, visible = [];
&amp;nbsp;&amp;nbsp; var identifyTask,identifyParams;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function init() {
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; //Popup
&amp;nbsp; esri.bundle.widgets.popup.NLS_searching = "Zoeken...";
&amp;nbsp; esri.bundle.widgets.popup.NLS_noInfo = "Niets gevonden";
&amp;nbsp; esri.bundle.widgets.popup.NLS_nextFeature = "Volgende";
&amp;nbsp; esri.bundle.widgets.popup.NLS_prevFeature = "Vorige";
&amp;nbsp; esri.bundle.widgets.popup.NLS_maximize = "Maximaliseren";
&amp;nbsp; esri.bundle.widgets.popup.NLS_restore = "Vorig formaat";
&amp;nbsp; esri.bundle.widgets.popup.NLS_close = "Sluiten";
&amp;nbsp; esri.bundle.widgets.popup.NLS_zoomTo = "Zoom in op selectie";
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var initialExtent = new esri.geometry.Extent({"xmin":157741,"ymin":378600,"xmax":181240,"ymax":394100,"spatialReference":{"wkid":28992}});
&amp;nbsp; 
&amp;nbsp; //setup the popup window&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var popup = new esri.dijit.Popup({ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,255,255]), 2), new dojo.Color([255,255,0,0])) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, dojo.create("div"));
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map",{
&amp;nbsp;&amp;nbsp; infoWindow:popup, 
&amp;nbsp;&amp;nbsp; extent: initialExtent,
&amp;nbsp;&amp;nbsp; logo: false});
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; dojo.addClass(map.infoWindow.domNode, "myTheme");//instellen dat de popup "myTheme" gebruikt
&amp;nbsp; dojo.connect(map, 'onLoad', mapReady);
&amp;nbsp; dojo.connect(map, "onLoad", function() {
&amp;nbsp;&amp;nbsp; map.disableDoubleClickZoom();
&amp;nbsp; });
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://atlas.sre.nl/ArcGIS/rest/services/TOPOGRAFIE/OSM_2011_ZW/MapServer");
&amp;nbsp; map.addLayer(basemap);&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://atlas.sre.nl/ArcGIS/rest/services/REGIO/lijst/MapServer", {opacity:.5});

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer.loaded) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; buildLayerList(layer);
&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; else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(layer, "onLoad", buildLayerList);
&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; function buildLayerList(layer) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var items = dojo.map(layer.layerInfos,function(info,index){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (info.defaultVisibility) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visible.push(info.id);
&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; return "&amp;lt;input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" + info.id + "' onclick='updateLayerVisibility();' /&amp;gt;&amp;lt;label for='" + info.id + "'&amp;gt;" + info.name + "&amp;lt;/label&amp;gt;&amp;lt;br&amp;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; dojo.byId("layer_list").innerHTML = items.join("");

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.setVisibleLayers(visible);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(layer);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function updateLayerVisibility() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var inputs = dojo.query(".list_item"), input;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visible = [];

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(inputs,function(input){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (input.checked) {
&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; visible.push(input.id);
&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; });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if there aren't any layers visible set the array to be -1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(visible.length === 0){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visible.push(-1);
&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; layer.setVisibleLayers(visible);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; function mapReady(map){ 
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map,"onClick",executeIdentifyTask); 
&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; //create identify tasks and setup parameters&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyTask = new esri.tasks.IdentifyTask("http://atlas.sre.nl/ArcGIS/rest/services/REGIO/lijst/MapServer"); 
&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; identifyParams = new esri.tasks.IdentifyParameters(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.tolerance = 10; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.returnGeometry = true; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.width&amp;nbsp; = map.width; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.height = map.height; 
&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;&amp;nbsp;&amp;nbsp; //resize the map when the browser resizes 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(dijit.byId('map'), 'resize', map,map.resize); 
&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; function executeIdentifyTask(evt) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.geometry = evt.mapPoint; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.mapExtent = map.extent; 
&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; var deferred = identifyTask.execute(identifyParams); 
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred.addCallback(function(response) {&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; // response is an array of identify result objects&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; // Let's return an array of features. 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dojo.map(response, function(result) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature = result.feature; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(result.layerName === 'Archeologie'){ 
&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(feature.attributes.PARCELID); 
&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; var template = new esri.InfoTemplate("", "&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Monumentnummer:&amp;lt;/strong&amp;gt; ${MONUMENTNR}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Waarde:&amp;lt;/strong&amp;gt; ${WAARDE}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Type:&amp;lt;/strong&amp;gt; ${COMPLEX}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Toponiem:&amp;lt;/strong&amp;gt; ${TOPONIEM}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Begin periode:&amp;lt;/strong&amp;gt; ${BEGIN_PERI}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Eind periode:&amp;lt;/strong&amp;gt; ${EIND_PERIO}&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Toelichting:&amp;lt;/strong&amp;gt;&amp;lt;br/&amp;gt;${TOELICHTING}&amp;lt;/p&amp;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; feature.setInfoTemplate(template);
&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; else if(result.layerName === 'Monumenten'){ 
&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(feature.attributes.PARCELID); 
&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; var template = new esri.InfoTemplate("", "&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Monumentstatus:&amp;lt;/strong&amp;gt; ${Monumentstatus}&amp;lt;br/&amp;gt;&amp;lt;strong&amp;gt;Monumentnummer:&amp;lt;/strong&amp;gt; ${Monumentnummer}&amp;lt;br/&amp;gt;&amp;lt;strong&amp;gt;Aanduiding:&amp;lt;/strong&amp;gt; ${Aanduiding}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Adres:&amp;lt;/strong&amp;gt; ${Adres}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Postcode:&amp;lt;/strong&amp;gt; ${Postcode}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Gemeente:&amp;lt;/strong&amp;gt; ${Gemeente}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Bouwjaar:&amp;lt;/strong&amp;gt; ${Bouwjaar}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Architect:&amp;lt;/strong&amp;gt; ${Architect}&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a id=info href=${html} target=${target}&amp;gt;Meer informatie&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;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; feature.setInfoTemplate(template); 
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (result.layerName === 'Rijksbeschermd stads/dorps-gezichten'){ 
&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; var template = new esri.InfoTemplate("", "&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Monumentstatus:&amp;lt;/strong&amp;gt; Rijksbeschemd stads/dorps-gezicht&amp;lt;br/&amp;gt;&amp;lt;strong&amp;gt;Naam: &amp;lt;/strong&amp;gt;${NAAM}&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a id=info href=${KICHLINK} target=${target}&amp;gt;Meer informatie&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;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; feature.setInfoTemplate(template); 
&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;&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; return feature; 
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // InfoWindow expects an array of features from each deferred 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // object that you pass. If the response from the task execution&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // above is not an array of features, then you need to add a callback 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // like the one above to post-process the response and return an 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // array of features. 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([ deferred ]); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(evt.mapPoint); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //show map on load 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.addOnLoad(init); 

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;


&amp;nbsp; &amp;lt;/head&amp;gt;
&amp;nbsp; &amp;lt;body class="soria"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; style="width: 100%; height: 100%; margin: 0;"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="map" dojotype="dijit.layout.ContentPane" region="center"&amp;gt;
&amp;nbsp; &amp;lt;div style="position:absolute; top: 5px; text-align: left; right:5px; z-index:50" id="layerlist"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;strong&amp;gt;Kaartlagen:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;span id="layer_list" &amp;gt;&amp;lt;/span&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;br&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;span style="font-size:x-small;"&amp;gt;Ondergrond: © &amp;lt;a href="http://www.openstreetmap.org" title="OpenStreetMap" target="_blank"&amp;gt;OpenStreetMap&amp;lt;/a&amp;gt; contributors, &amp;lt;a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Creative Commons Attribution-ShareAlike" target="_blank"&amp;gt;CC-BY-SA&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; 
&amp;nbsp; &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344857#M31813</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2021-12-11T16:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344858#M31814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I also have this issue.&amp;nbsp; I'm using deferreds to identify from multiple services, but even if a particular layer in the service is not visible, it is still identified.&amp;nbsp; My identifyParameters variable is set to &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;&lt;/PRE&gt;&lt;SPAN&gt;.&amp;nbsp; ESRI, what gives?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 12:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344858#M31814</guid>
      <dc:creator>ShawnHolyoak</dc:creator>
      <dc:date>2012-02-09T12:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344859#M31815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was having the same issue. identifyParams.LAYER_OPTION_VISIBLE would still identify layers that are hidden (not checked in the dijit.legend).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I *think* the LAYER_OPTION_VISIBLE pertains to the scale visibility, set in either the rest service or when the feat. layer is added to the map. So, if your at a scale within the layer visible scale range, it will identify, regardless if it's 'turned on' or not in the dijit.legend widget. I even tried adding LAYER_OPTION_VISIBLE param to the begining of the click event, so the layer visibility list would be 'more up to date' but it didn't work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did find that the identifyParams.layerIds does restrict the identify layers, so I simply added this to the beginning of the onClick function, prior to identifyTask.execute(identifyParams):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//lets manually set the identifyParams.layerIds
//to the layers that are currently checked in the legend widget
var lids = [];
dojo.forEach(legendLayers, function(layer){
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer.layer.visible === true){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lids.push(map.getLayer(layer.layer.id).layerId)
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
});
identifyParams.layerIds = lids;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:15:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344859#M31815</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2021-12-11T16:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344860#M31816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I was having the same issue. identifyParams.LAYER_OPTION_VISIBLE would still identify layers that are hidden (not checked in the dijit.legend).&lt;BR /&gt;&lt;BR /&gt;I *think* the LAYER_OPTION_VISIBLE pertains to the scale visibility, set in either the rest service or when the feat. layer is added to the map. So, if your at a scale within the layer visible scale range, it will identify, regardless if it's 'turned on' or not in the dijit.legend widget. I even tried adding LAYER_OPTION_VISIBLE param to the begining of the click event, so the layer visibility list would be 'more up to date' but it didn't work. &lt;BR /&gt;&lt;BR /&gt;I did find that the identifyParams.layerIds does restrict the identify layers, so I simply added this to the beginning of the onClick function, prior to identifyTask.execute(identifyParams):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//lets manually set the identifyParams.layerIds
//to the layers that are currently checked in the legend widget
var lids = [];
dojo.forEach(legendLayers, function(layer){
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer.layer.visible === true){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lids.push(map.getLayer(layer.layer.id).layerId)
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
});
identifyParams.layerIds = lids;
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks I've added your code but it's still not working. It still identifies sublayers which are turned off in the layerlist. I thought it is something with the lids and the build layer list. But I can't really pinpoint it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:15:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344860#M31816</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2021-12-11T16:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344861#M31817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks I've added your code but it's still not working. It still identifies sublayers which are turned off in the layerlist. I thought it is something with the lids and the build layer list. But I can't really pinpoint it.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i should have added, my map contains all featureLayers. I then add the layer definition info to a legendLayers array; pretty sure I got this from the visible layers sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var legendLayers = []
var parcels = new esri.layers.FeatureLayer("restURL",{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode:esri.layers.FeatureLayer.MODE_SNAPSHOT,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 'parcels',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields:["*"]
});
legendLayers.push({layer:parcels,title:"Property Boundaries"});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after the click event, you loop over the legendLayers array, checking to see which layers are visible; if visible, add the layerId to the lids array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(lids) will tell you what layerId's are currently visible&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344861#M31817</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2021-12-11T16:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344862#M31818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had the same issue and resolved it like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use this function from one of the samples&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function updateLayerVisibility() {
var inputs = dojo.query(".list_item"), input;

visible = [];

dojo.forEach(inputs,function(input){
&amp;nbsp; if (input.checked) {
&amp;nbsp;&amp;nbsp; visible.push(input.id);
&amp;nbsp; }
 
&amp;nbsp; });
//if there aren't any layers visible set the array to be -1
if(visible.length === 0){
&amp;nbsp; visible.push(-1);
}
dynamicMapServiceLayer.setVisibleLayers(visible);

}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then added &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt; identifyParams.layerIds = visible&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the relevant place and it all worked!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was quite surprised&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344862#M31818</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2021-12-11T16:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344863#M31819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I'm going to try it and I'll get back to you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 05:36:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344863#M31819</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2012-07-17T05:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344864#M31820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you are experiencing&lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDQyNDQx"&gt; [NIM042441 The layerOption LAYER_OPTION_VISIBLE not working as expected while using Identify Task.]&lt;/A&gt;&lt;SPAN&gt;. The LAYER_OPTION_VISIBLE seems only response to the default visible layers in the map service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To workaround this, as &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;amarsden&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; did, please assign the list of visible layer to the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/identifyparameters.htm#layerIds"&gt;IdentifyParameters.layerIds&lt;/A&gt;&lt;SPAN&gt; property, which can force the identify task to only perform the find operation on the&amp;nbsp; specified layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 17:14:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344864#M31820</guid>
      <dc:creator>SiqiLi</dc:creator>
      <dc:date>2012-07-17T17:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344865#M31821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I think you are experiencing&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDQyNDQx"&gt; [NIM042441 The layerOption LAYER_OPTION_VISIBLE not working as expected while using Identify Task.]&lt;/A&gt;. The LAYER_OPTION_VISIBLE seems only response to the default visible layers in the map service.&lt;BR /&gt;&lt;BR /&gt;To workaround this, as &lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;amarsden&lt;/STRONG&gt;&lt;/SPAN&gt; did, please assign the list of visible layer to the &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/identifyparameters.htm#layerIds"&gt;IdentifyParameters.layerIds&lt;/A&gt; property, which can force the identify task to only perform the find operation on the&amp;nbsp; specified layers.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you tell how I do this? My code is still the same as in the first post because I don't seem to be able to find out how to integrate the IdentifyParameters.layerIds&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 05:15:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344865#M31821</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2012-07-18T05:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344866#M31822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It looks like you should be able just to add&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;identifyParams.layerIds = visible&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp; function executeIdentifyTask(evt) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.geometry = evt.mapPoint; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.mapExtent = map.extent; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to give you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp; function executeIdentifyTask(evt) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.geometry = evt.mapPoint; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.mapExtent = map.extent;
identifyParams.layerIds = visible &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should work&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:15:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344866#M31822</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2021-12-11T16:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344867#M31823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It looks like you should be able just to add&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;identifyParams.layerIds = visible&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp; function executeIdentifyTask(evt) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.geometry = evt.mapPoint; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.mapExtent = map.extent; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;to give you&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp; function executeIdentifyTask(evt) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.geometry = evt.mapPoint; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.mapExtent = map.extent;
identifyParams.layerIds = visible &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Should work&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks! It works!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344867#M31823</guid>
      <dc:creator>SwenWaschk</dc:creator>
      <dc:date>2021-12-11T16:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344868#M31824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;An alternative I posted here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/68803-BUG-.visibleLayers-returns-group-layeys?p=240650#post240650"&gt;http://forums.arcgis.com/threads/68803-BUG-.visibleLayers-returns-group-layeys?p=240650#post240650&lt;BR /&gt;&lt;BR /&gt;B&lt;/A&gt;&lt;SPAN&gt;asically I had moved away from the check boxes I had in my earlier post.&amp;nbsp; Initially I tried "&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Courier New;"&gt;identifyParams.layerIds = dynamicMapServiceLayer.visibleLayers;"&amp;nbsp; but that fails when you have group layyers - see post.&lt;BR /&gt;&lt;BR /&gt;So the function I now use is a simple check for layers and groups one&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;function getVisibleLayers() {&amp;nbsp;&amp;nbsp;&amp;nbsp; var visibleLayers = [];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var items = dojo.map(dynamicMapServiceLayer.layerInfos, function (info, index) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerID = info.id;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (info.visible &amp;amp;&amp;amp; !info.subLayerIds) {&lt;/SPAN&gt;&lt;BR /&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; visibleLayers.push(layerID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); return visibleLayers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;Call in you id task code with &lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v = getVisibleLayers();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.layerIds = v;&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BTW, can anyone else (none esri staff) get the link to the bug report from &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Verdana;"&gt;Shuping Li to work?&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ACM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 08:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344868#M31824</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2012-10-15T08:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344869#M31825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;BTW, can anyone else (none esri staff) get the link to the bug report from &lt;SPAN style="color: #3E3E3E; font-family: Verdana;"&gt;Shuping Li to work?&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Courier New;"&gt;&lt;BR /&gt;ACM&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;FWIW, just search Nimbus using the report number and you'll get to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDQyNDQx"&gt;http://support.esri.com/en/bugs/nimbus/TklNMDQyNDQx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 09:14:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344869#M31825</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-10-15T09:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344870#M31826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Many thanks - so reported over 3 years ago!!&amp;nbsp; So, I don't think I'll hold my breath for a fix anytime soon.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 09:16:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344870#M31826</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2012-10-15T09:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344871#M31827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Many thanks - so reported over 3 years ago!!&amp;nbsp; So, I don't think I'll hold my breath for a fix anytime soon.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know if this is fixed in 3.6?&amp;nbsp; (I am on lower API for a while longer).&amp;nbsp; Or if ESRI can comment whether it will be fixed?&amp;nbsp; NIM is still open.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My suggestion would be for ESRI to include a sample that is an Identify widget that identifies all visible layers and works well with AGS JS TOC with dynamic layers with many cascading groups with hundreds of layers, as well as consider including AGS JS TOC in the API itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 16:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344871#M31827</guid>
      <dc:creator>KevinMacLeod1</dc:creator>
      <dc:date>2013-09-04T16:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344872#M31828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;NIM is still open.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In REST API, "visible" means default visibility defined in map service, not in the client map instance. The JS API design separated task from Map/service, as a result, the task has no knowledge of which layer is actually visible -- because it does not hold a reference to the map/service instance. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Given the circumstance, it is much easier for the application code, which holds reference to both service and task, to passing the actual visible ID list into IdentifyParameter and use IDENITIFY_ALL. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To fix the "bug", the identify task class has to accept the map service layer in the constructor, which would be a bit awkward coding neatness wise, and I see no incentive to fix that from Esri perspective, so my advise is that do not count on it, use the alternative and move on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 17:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344872#M31828</guid>
      <dc:creator>NianweiLiu</dc:creator>
      <dc:date>2013-09-04T17:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344873#M31829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Now why didn't anyone at Esri state the above - so, in Microsoft term, "This behaviour is by design"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "bug" should remain through, but be changed to say "make the documentation clear"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 09:31:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344873#M31829</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2013-09-05T09:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyParameters.LAYER_OPTION_VISIBLE still gives identify results on all layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344874#M31830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just run into this bug/design feature/whatever it is. I can't seem to figure a way around it. I have a popup window displaying the results of multiple identify tasks on multiple dynamic map service layers, each with sublayers. The layerId property of the IdentifyParameters seems to only acknowledge the ids of the sublayers, not the parent dynamic service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, if I have two services, one of which is currently visible and the other not, and I want this reflected in the identify results by only displaying attributes of the visible service, there doesn't seem to be any way to tell the identify parameters to ignore the hidden parent service because the layerId property is only paying attention to the sublayers. If I assign the layerId property "0", it's seeing it as sublayer 0 (not parent layer 0), and of course, every dynamic service has a sublayer 0, so sublayer 0 will be displayed from both services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know a good way around this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 18:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layer-option-visible-still/m-p/344874#M31830</guid>
      <dc:creator>NicholasGross</dc:creator>
      <dc:date>2013-10-28T18:09:43Z</dc:date>
    </item>
  </channel>
</rss>

