[OpenLayers-Users] LayerSwitcher - Panel show and disable layerentry - additional

Jan Tappenbeck osm at tappenbeck.net
Fri Aug 20 07:15:19 EDT 2010


this version show the panel permanent - is it possible to hide again by 
the (+) sign ???

regards Jan :-)



Am 20.08.2010 13:13, schrieb Jan Tappenbeck:
> HI !
>
> thanks for the message - and it work - look at:
>
> http://www.tappenbeck.net/osm/maps/deu/index_new.php?id=1017
>
> but can you tell me why firebugs write:
>
> layer is not defined
> [Break on this error] layer.setVisibility(false);
>
> regards Jan :-)
>
>
>
> Am 19.08.2010 15:09, schrieb BMcBride:
>>
>> To make the layerswitcher initially visible, you can do something like:
>>
>> map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
>> var ls = map.getControlsByClass('OpenLayers.Control.LayerSwitcher')[0];
>> ls.maximizeControl();
>>
>> To set layer visibility, you can do something like:
>>
>> layer.setVisibility(false);
>>
>>
>> -----
>> Bryan R. McBride, GISP
>> http://www.bryanmcbride.com bryanmcbride.com
>> http://geoserving.net/ geoserving.net





More information about the Users mailing list