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

BMcBride bmcbride at chacompanies.com
Fri Aug 20 09:05:51 EDT 2010


OK- So it looks like you have several instances of the LayerSwitcher control
in your code (see lines 46, 62, 219). This is why it does not appear to hide
correctly.  Remove 2 of these controls and you should be all set.

As for your "layer not defined" error...  I was assuming that you were
trying to hide a layer when the map initially loads.  So if you wanted the
"Hofladen" layer to be initially hidden and unchecked, you would have to set
the layer as a variable and use setVisibility(false);.


var hofladen =  new OpenLayers.Layer.PopupMarker("Hofladen", {  ...

map.addLayer(hofladen);
hofladen.setVisibility(false);


-----
Bryan R. McBride, GISP
http://www.bryanmcbride.com bryanmcbride.com 
http://geoserving.net/ geoserving.net 
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/LayerSwitcher-Panel-show-and-disable-layerentry-tp5438853p5444428.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list