Select to view content in your preferred language

Known issues when using 'LAYER_OPTION_VISIBLE' parameter in identify task?

575
1
06-09-2011 03:33 AM
ChrisBuckmaster1
Occasional Contributor
Hi

Just wondering if anyone is using the visible layer option parameter successfully in an identify task to identify just those layers visible on the map?

I cannot seem to get it to work and came across the same issue in this thread (http://forums.esri.com/Thread.asp?c=158&f=2396&t=261892)

I tried using the following code as mentioned but this didn't help:-

identifyParams.layerIds=myDynamicMapServiceLayer.visibleLayers;


Any suggestions?

Thanks!
0 Kudos
1 Reply
JeffPace
MVP Alum
If you are specifying layerids (and determining layerids from the service) , i think you should be specifying

identifyParams.layerIds = myDynamicMapServiceLayer.visibleLayers;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;

otherwise i think you would leave out the ids and just say

identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
0 Kudos