[OpenLayers-Users] Starting function if layerstatus is changed

Alexandre Dube adube at mapgears.com
Fri Aug 14 08:37:41 EDT 2009


Hi Kai,

  Maybe the layer's event "visibilitychanged" could be what you need.

Regards,

Alexandre

Kai Behncke wrote:
> Dear users,
>
>
>
>
> I would like to start a function if the layer is on/off.
>
> I tried e.g.
>
>
> if (this.map.events.triggerEvent("changelayer")){
> alert ("here we go");
> }
>
>
> and 
>             
> if (my_layer.display()){
>
> alert ("here we go");
> }
>
>
> ...but so far without success.
> Can anybody help please?
>
> Thank you very much, Kai
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list