Select to view content in your preferred language

Exclude a specific layer in identifyLayersAsync (

490
2
05-28-2019 05:23 AM
JorgeConconi
New Contributor

How to exclude a specific layer from the operational layers in a mMapView.identifyLayersAsync ( ?

I'm going to change the visibility but I do not think it's correct.
Thank you very much and sorry for my English.

0 Kudos
2 Replies
Nicholas-Furness
Esri Regular Contributor

Hi Jorge,‌

In general, Identify is meant to provide feedback to user interaction, so works on visible layers in the map. So, if a layer is in the map and has identify capabilities (as defined on the service), it will be included in the IdentifyLayers operation.

You could discard the results for that specific layer from the identifyLayersAsync call (you get an array of IdentifyLayerResult objects back, each of which represents a layer), or you could identify only a subset of layers by calling identifyLayerAsync on each.

If you change the visibility, the user might notice that in the map view (but you might get away with it). Note that changing the layer opacity does not affect identify.

Hope that helps.

Nick.

JorgeConconi
New Contributor

I decided to remove the ability to identify in the service because it only serves contextual purposes.
Thank you very much for your help.