[OpenLayers-Users] VisibilityChanged event handler

Erik Uzureau erik.uzureau at metacarta.com
Wed Apr 18 11:22:00 EDT 2007


Hi Dmitri,

For right now the best solution I can think of is to listen for the
"changebaselayer" event on the map. When the user clicks a different
baselayer, this gets fired.

Erik


On 4/18/07, Dmitri Mizerkin <eisberg at gmail.com> wrote:
>
> 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
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070418/7319165f/attachment.html


More information about the Users mailing list