[OpenLayers-Users] set layer state

Gregor Mosheh gregor at hostgis.com
Sun Dec 2 20:25:27 EST 2007


Richard Greenwood wrote:
> How do you set a layer's state (turn it on/off) programmatically in JavaScript?

http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html

layer.setVisibility(true);
layer.setVisibility(false);


-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the Users mailing list