var idParams = new IdentifyParameters(); idParams.width = map.width; idParams.height = map.height; idParams.geometry = evt.mapPoint; idParams.mapExtent = map.extent; idParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE; idParams.layerIds = layer.visibleLayers; idParams.tolerance = 3; idParams.returnGeometry = true; idParams.spatialReference = map.spatialReference;
Note: In the case of dynamic layers the layer list is ignored, it instead uses top or all (default) to identify the layers defined in dynamicLayers parameter.
Have you tried setting the layerIds property of the IdentifyParameters? var idParams = new IdentifyParameters(); idParams.width = map.width; idParams.height = map.height; idParams.geometry = evt.mapPoint; idParams.mapExtent = map.extent; idParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE; idParams.layerIds = layer.visibleLayers; idParams.tolerance = 3; idParams.returnGeometry = true; idParams.spatialReference = map.spatialReference;
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.