Hi,
How can I do the respectCurrentMapScale in ths 4.15 api versaion?
Thanks.
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.
Determines whether to respect the properties of the layers in the map that control the legend's visibility (minScale, maxScale, legendEnabled).
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.
respectLayerVisibility
false
Does this answer your question?
BR,
Egge-Jan
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.