The OpenLayers.Control
class possesses an eventListener
property which could be used in the layer switcher control. I am not sure how to make use of it to detect a base layer change event so that I can store the variable name of the chosen layer to be used subsequently when the user navigate back to the map page. Can anyone give me some hints?
[GIS] How to record a base layer change event in OpenLayers
eventslayersopenlayers-2
Best Answer
You can check this link and view page source: Events Example
I think it has exactly what you want.