layerSwitcher: display layer groups
javidrasouli opened this issue · comments
hi ,
i try to use of ol-layerswitcher-control and want to just show layer groups in display but layerswitcher show all of layers in the map how can fix it ?
Hey, can you please provide some example code demonstrating your problem?
maybe you can use the 'layer-group' in layerSwitcher
can you please some example of use that ?
@javidrasouli I was able to reconstruct the issue. There was indeed a problem since layers were added twice (1x to the map itself, 1x to the layerGroup). This caused the layers were displayed also twice in the switcher (and of course unnecessary perf issues since the layer was rendered twice as well).
I harmonized the layer behavior across all layers creating a common composable. I released it with version 9.0.0.