add LayerSwitcher control. Currently, when added, this will simply loop through all the map layers, display a div (with text in it) which allows you tu turn the layer on or off. Layer visibility is a new concept in Layer.js, including a getter and setter, which uses the style.visibility prop to change the status of the layer.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@31 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-14 02:44:49 +00:00
parent 45655e12a2
commit 54c0403850
5 changed files with 60 additions and 1 deletions

View File

@@ -24,6 +24,7 @@
{map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'} );
map.addLayer(layer);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
map.setCenter(new OpenLayers.LatLon(lat, lon), zoom);
}
// -->