[OpenLayers-Users] displayInLayerSwitcher on base layer problem

Keith Wiley kwiley at keithwiley.com
Wed May 9 12:52:01 EDT 2012


This works, but the layer's single radio-button option is displayed in the layer switcher:

	var mapLayer = new OpenLayers.Layer.OSM("Simple OSM Map");

The following are my attempts to remove the layer from the layer switcher.  The result is that the entire map is blank (completely white, no icons for the kml selectable features, although randomly clicking on the blank area will display the proper popups if I manage to hit them!) and no layer switch 'plus-sign' button is even visible (and clicking its location doesn't open the layer switcher):

	var mapLayer = new OpenLayers.Layer.OSM("Simple OSM Map", {
		displayInLayerSwitcher: false
	});

	var mapLayer = new OpenLayers.Layer.OSM("Simple OSM Map", {
		'displayInLayerSwitcher': false
	});

	var mapLayer = new OpenLayers.Layer.OSM("Simple OSM Map", {
		"displayInLayerSwitcher": false
	});

Isn't one of those correct?

Thanks.

________________________________________________________________________________
Keith Wiley     kwiley at keithwiley.com     keithwiley.com    music.keithwiley.com

"It's a fine line between meticulous and obsessive-compulsive and a slippery
rope between obsessive-compulsive and debilitatingly slow."
                                           --  Keith Wiley
________________________________________________________________________________



More information about the Users mailing list