Hi Jan,

looks as if you are still adding two LayerSwitcher Controls:

  1. in the Map-Constructor (new OpenLayers.Map(...))
  2. and one in line 219 (map.addControl(new
     OpenLayers.Control.LayerSwitcher());)

I'd suggest getting rid of the second one.

What exactly do you mean by deactivate the checkbox? Adding displayInLayerSwitcher : false to a layers options-object will result in a layer not being shon in the LayerSwitcher.

Regards,
Marc


Am 20.08.2010 16:37, schrieb Jan Tappenbeck:
Am 20.08.2010 15:05, schrieb BMcBride:
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
thanks for response.

now i kill a double layers switch in

http://www.tappenbeck.net/osm/maps/deu/index_new.php?id=1017

but when you click "+" only an other layerpanel will show - like a
overlay to the other. but i see no possiblity to hide the hole panel again !

can you give me more detail because my englisch is not very well and i
am a beginner of ol!!

this was one question - the other is how to deactive a layer-checkbox in
the panel by default ??!?!?

can you help me more ??

regards Jan :-)

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to