Can definitionExpression be dynamically used with zoom scale/LOD ?

167
2
09-01-2020 09:32 AM
victhomas
New Contributor III

Hello,

Just a quick question in regards to layer's definitionExpression, have been searching for a little bit but haven't come across it.  Is there a way to display how many features gets to be rendered based on the zoom scale or LOD?  example; set definitionExpression = 'active' at the start of the map load 1:1,000,000, as users zoom in further to 1:500,000 definitionExpression in ('inactive','active'), and so on so forth.  TIA.!

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Vic,

   If you are asking about 4.x then just add a watch on the views scale property and change the layers def expr based on that.

0 Kudos
TanuHoque
Esri Regular Contributor

Vic,

Not sure whether you question was more from programing side or not. If the Q was about programming side, then you can skip the rest of my comment.

Otherwise, if you publish your data from ArcGIS Pro and as a map service (aka map image layer), you can use display filters - as the name suggests, unlike def queries this only affects drawing, but if you want to query/identify you can still do that on features that are not drawn

Use display filters—ArcGIS Pro | Documentation 

please let me know if you have any question.

Thanks.

Tanu

0 Kudos