[OpenLayers-Users] VisibilityChanged event handler

Schuyler Erle sderle at metacarta.com
Wed Apr 18 11:26:57 EDT 2007


Dmitri, I think we would accept a patch for 2.5 if you or anyone else
wanted to submit one for this.

SDE

On Wed, 2007-04-18 at 10:22 -0500, Erik Uzureau wrote:
> 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
>         
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list