Solved! Go to Solution.
I think you are experiencing [NIM042441 The layerOption LAYER_OPTION_VISIBLE not working as expected while using Identify Task.]. The LAYER_OPTION_VISIBLE seems only response to the default visible layers in the map service.
To workaround this, as amarsden did, please assign the list of visible layer to the IdentifyParameters.layerIds property, which can force the identify task to only perform the find operation on the specified layers.
identifyParams.layerIds = visible
function executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent;
function executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; identifyParams.layerIds = visible
It looks like you should be able just to addidentifyParams.layerIds = visible
tofunction executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent;
to give youfunction executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; identifyParams.layerIds = visible
Should work
BTW, can anyone else (none esri staff) get the link to the bug report from Shuping Li to work?
ACM
Many thanks - so reported over 3 years ago!! So, I don't think I'll hold my breath for a fix anytime soon.
NIM is still open.