IdentifyTask and definitionExpression

04-14-2021 05:41 AM
New Contributor III

I am using the MapImageLayer to load my layers into the map in ArcGIS API for JavaScript 4.9.

I have set up the IdentifyTask, and it works great except for one problem. I allow the end-user to search on a date range which sets a definition expression to only display those features. However, the identify popup includes those features that are being excluded using the definition expression. On API version 3.xx I see a layerOptions parameter where I can pass the expression, but can't acomplish this with API 4.xx.

How do I get an Identify popup for only those features that are visible because of the definition expression?

0 Kudos
3 Replies
Esri Regular Contributor

HI there, 

This cannot be done at this time. We have an issue to add those missing parameters to 4.x IdentifyParameter class. We care also working on for the popup to show information only for visible features. I will update you once those issues are installed. 


0 Kudos
New Contributor

Hi Undral,

Is there an ETA on when the 4.x IdentifyTask will respect definition expressions?   Thanks.


0 Kudos
Esri Regular Contributor

Hello @RodrigoFelga and @RianCrowley1 - we have this property added to the IdentifyParameter class for the next version of the API (4.22), which is expected to release later this week. We appreciate your patience.

0 Kudos