AnsweredAssumed Answered

WebMap JSON and Identifying Visible Layers

Question asked by matthewfnicol on Feb 4, 2014
Latest reply on Feb 20, 2014 by martinr79
I am creating my map based on the Web Map JSON format:

http://resources.arcgis.com/en/help/arcgis-web-map-json/#/Web_map_format_overview/02qt00000007000000/
https://developers.arcgis.com/javascript/jsapi/esri.arcgis.utils-amd.html#createmap

Doing this, identify operations are automatically set up according to the popup configuration in the JSON.  (In other words, I don't have to write code myself to set up IdentifyTasks.)

If a given operational layer is visible, the default identify behavior appears to identify against the default visible layers.  However, I am switching layers on and off through the setVisibleLayers function here:

https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#setvisiblelayers

Doing this, the pop-ups will sometimes display results for layers that aren't visible.

Is it possible to change this behavior without rewriting the identify logic myself?

Thanks!

Outcomes