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
[email protected]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to