Closed mysiar closed 3 years ago
I have a case that I build the base map with LayerSwitcher. Later on I create groups and set their visibility depend on the config but LayerSwitcher do not see the visibility in Panel. Is there any way I can hook it to update Switcher based on group visibility ?
I found out if I add layer to group and set layer visibility to group visibility that LayerSwitcher is updated the way I wanted :)
Hi, you can also call the renderPanel
method of your instance which should update the layers shown in the panel to match the current state of the map 👍
I have a case that I build the base map with LayerSwitcher. Later on I create groups and set their visibility depend on the config but LayerSwitcher do not see the visibility in Panel. Is there any way I can hook it to update Switcher based on group visibility ?