[OpenLayers-Users] [ZS0] layer on/off

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Sun Oct 5 06:28:13 EDT 2008


Yes, you can use:

<a href="javascript:layer.setVisibility(true);" >Show</a>
<a href="javascript:layer.setVisibility(false);" >Hide</a>
<a href="javascript:layer.setVisibility(!layer.getVisibility());" >Toggle</a>

Where "layer" is the layer to show/hide.

Regards, Kenneth Skovhede, GEOGRAF A/S



Kenny skrev:
>
> Hi All,
>
>  
>
> Is it possible (example) to “turn” a layer on / off without using the 
> layers switcher on the map?
>
>  
>
> I mean if I have a marker layer I can click a link and display / hide 
> a specific layer?
>
>  
>
> Thanks
>
>  
>
> K-
>
>  
>
>
> ------------------------------------------------------------------------
> I am using the Free version of SPAMfighter for Personal use.
> SPAMfighter has removed 2722 of my spam emails to date.
> Try SPAMfighter <http://www.spamfighter.com/len> for free now!
>
> The Trial and Professional version does not have this message in the email
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/20081005/fa5fe3b9/attachment.html


More information about the Users mailing list