Select to view content in your preferred language

How to show only layers in map extent in the legend

751
2
10-03-2022 02:02 AM
Marokapara
Frequent Contributor

Hi ExB community,

Is it possible for the legend to only show the layers showing in the map extent and have this dynamically change as the user zooms in and out of the map?

Thanks in advance for your reply.

Tags (2)
2 Replies
UalasRohrer
Regular Contributor

@Marokapara I think the web map/legend already does this by default. If you zoom out from the features, it disappears from the legend. Just make sure you're setting zoom limits for each layer in your web map.

0 Kudos
Marokapara
Frequent Contributor

Hi @UalasRohrer , Thanks for your reply. I'm referring to the map extent, not the zoom level. So if I have some layers showing out of the map frame, I don't want them showing in the legend. I want them to reappear though when I zoom out and the layer comes into the map frame view.