}
function createMap(divName) {
- map = new OpenLayers.Map(divName);
+ map = new OpenLayers.Map(divName, {
+ controls: [
+ new OpenLayers.Control.ArgParser(),
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.PanZoomBar()
+ ]
+ });
var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { displayOutsideMaxExtent: true });
map.addLayer(mapnik);
});
map.addLayer(markers);
- map.addControl(new OpenLayers.Control.LayerSwitcher());
- // map.addControl(new OpenLayers.Control.KeyboardDefaults());
-
return map;
}