[OpenLayers-Users] VisibilityChanged event handler

Dmitri Mizerkin eisberg at gmail.com
Wed Apr 18 10:08:15 EDT 2007


Hello List,

I am using layer pairs in my map, one of those for selection. I would like
to remove the selection layer from the map as soon as the user removes the
main layer using the layer switcher. Is it possible to register some
"visibilityChanged" event handler, so that it calls a function as soon as
its visibility parameter changes?
It could be something like that:

layer.events.register("visibilityChanged", layer, function(e) {} );

Maybe there is some way to register the event in the layer switcher control
as well, which could call the function as soon as it has changes?

Thanks in advance!
Dmitri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070418/a653f63e/attachment.html


More information about the Users mailing list