Hi all,
does someone of you know a good way to turn on/off multiple layers with one click using a button (or something)?
So basically I have a map with multiple layers (e.g. layers A, B, C, D).
On default only layer A should show.
When clicking button B, none but layer B should show.
If I click button C, only layer C should be activated, and so on...
Bookmarks won't work, because I don't want to change the map extent...
Solved! Go to Solution.
Hi Mario,
There is nothing out of the box that allows you to achieve this besides using the layers widget. What you're describing is something that can be created with a custom widget. We do have an issue in our repo on how to tie into the layers widgets from other widgets. You could use the section widget to achieve the workflow you're describing above. Each section would have different maps with the correct layers already turned on. Then you could use the views navigation widget or button widget to switch between views. Then have an action for each map that basically zooms to the area.
Cheers,
David
anyone any thoughts?
Hi Mario,
There is nothing out of the box that allows you to achieve this besides using the layers widget. What you're describing is something that can be created with a custom widget. We do have an issue in our repo on how to tie into the layers widgets from other widgets. You could use the section widget to achieve the workflow you're describing above. Each section would have different maps with the correct layers already turned on. Then you could use the views navigation widget or button widget to switch between views. Then have an action for each map that basically zooms to the area.
Cheers,
David
Thank you David,
I tried that, but I'm experiencing some issues with the sync of the map extent. It works fine the first time, but when you switch back or go to the next section, it won't keep the map extent. Although I had setup the map actions for that.
Can you remove the Pan to and only use the zoom to and see if that works? We have an open issue on those two actions canceling one another out.
Thanks David, that's working now
a solution for this is badly needed.
I agree. There should be a reset button incorporated into the layers widget. Feels like it should be a standard option.