[OpenLayers-Users] set layer state
Christopher Schmidt
crschmidt at metacarta.com
Sun Dec 2 21:13:59 EST 2007
On Sun, Dec 02, 2007 at 06:54:00PM -0700, Richard Greenwood wrote:
> 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...
This should happen automatically. (When I say 'should' in this case, I
mean "I just tested it, and it did.") Can you share a minimal example
that causes this to not be the case?
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list