[OpenLayers-Users] LayerSwitcher Event

Eric Lemoine eric.lemoine at camptocamp.com
Sun Feb 20 01:16:09 EST 2011


On Friday, February 18, 2011, Richard Greenwood
<richard.greenwood at gmail.com> wrote:
> Answering my own question (which might not be the best answer!) I have
> found that the following works:
>
> map.events.register('changelayer', null, function(evt){
>        if(evt.property === "visibility") {
>           alert(evt.layer.name + " layer visibility changed to " +
> evt.layer.visibility );
>        }
>    }
> );

Yes, I was just me dreaming about straightforward APIs :-)

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list