[OpenLayers-Users] set layer state

Richard Greenwood richard.greenwood at gmail.com
Sun Dec 2 20:54:00 EST 2007


On Dec 2, 2007 6:25 PM, Gregor Mosheh <gregor at hostgis.com> wrote:
> 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);

Thanks, now I'm off in search of how to update the  LayerSwitcher to
reflect the state change...

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the Users mailing list