respectCurrentMapScale 4.15

308
1
08-25-2020 11:14 PM
OmerBen-Asher
New Contributor III

Hi,

How can I do the respectCurrentMapScale in ths 4.15 api versaion?

Thanks.

0 Kudos
1 Reply
Egge-JanPollé1
MVP Regular Contributor

Hi Omer Ben-Asher

I suppose you are talking here about a v3.x property of the Legend | API Reference | ArcGIS API for JavaScript 3.33.

It looks like in v4.x of the JS API you have to use the respectLayerVisibility property: Legend | ArcGIS API for JavaScript 4.16 

This property

Determines whether to respect the properties of the layers in the map that control the legend's visibility (minScale, maxScale, legendEnabled).

When the respectLayerVisibility property of the legend is set to false, the legend elements for each layer in the map will always display, thus disregarding the minScale, maxScale, and legendEnabled properties for each layer in the map.

Does this answer your question?

BR,

Egge-Jan