MelihAltintas / vue3-openlayers

Web map Vue 3.x components with the power of OpenLayers
https://vue3openlayers.netlify.app/
MIT License
629 stars 120 forks source link

layerSwitcher: display layer groups #344

Closed javidrasouli closed 1 month ago

javidrasouli commented 2 months ago

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 ?

d-koppenhagen commented 2 months ago

Hey, can you please provide some example code demonstrating your problem?

DLinser commented 2 months ago

maybe you can use the 'layer-group' in layerSwitcher

javidrasouli commented 2 months ago

can you please some example of use that ?

d-koppenhagen commented 1 month ago

@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.