Identify returns features filtered by definitionExpression

02-10-2021 05:05 AM
New Contributor II


we're developing a custom solution based on Javascript ESRI  4.x  and we have configured this viewer to hide some featuers based on user criteria, using the layer definitionExpression feature.

Features on map are showing correctly, based onthe filter value, but if we create an IdentifyTask, this will get any feature in the map regardless it's filtered or not.

So we get a filtered map view but user can anyway identify hidden objects on the layer.

How can we deal with this to get Identify working only on non filtered objects on the layers ?


Kind regards


0 Kudos
1 Reply
New Contributor II

I think I found the (bad) answer here :


4.x API is missing a useful option (layerDefinitions ) in identifyParameters, so unfortunately we have to filter manually the result in the identify result function.


0 Kudos