walkermatt / ol-layerswitcher

Layer control for OpenLayers
MIT License
380 stars 175 forks source link

get radio button event #66

Closed zwnk closed 6 years ago

zwnk commented 6 years ago

Hi there,

I started to playing around with openlayers and your ol3-layerswitcher project. Please excuse my lack of knowledge regariding js i thought i maybe you could give me an answer. I created a map where beside some dynamically loaded layers 2 base layers are present. BingMaps Aerial and openstreetmaps are those. Due to the nature of the Aerial imagery i switch it off depending on the zoomlevel. This brings the situation that the user cannot select the basemap if the zoomlevel does not permit it. So i would need to know how to get an event of the layerswitch button to detect user interaction. Can you give me a hint how to do that with ol3/layerswitcher? Thank you very much in advance.

walkermatt commented 6 years ago

See https://github.com/walkermatt/ol-layerswitcher/issues/30#issuecomment-190136675 which I think should help.