Select to view content in your preferred language

IdentifyTask and definitionExpression

719
3
04-14-2021 05:41 AM
RodrigoFelga
Regular Contributor

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
UndralBatsukh
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. 

-Undral

0 Kudos
RianCrowley1
Emerging Contributor

Hi Undral,

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

-Rian

0 Kudos
Noah-Sager
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