Use PanZoomBar instead of PanZoom.
This commit is contained in:
parent
e40d49ca73
commit
253c10393d
1 changed files with 9 additions and 4 deletions
|
@ -7,7 +7,15 @@ OpenLayers._getScriptLocation = function () {
|
|||
}
|
||||
|
||||
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);
|
||||
|
@ -28,9 +36,6 @@ function createMap(divName) {
|
|||
});
|
||||
map.addLayer(markers);
|
||||
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
// map.addControl(new OpenLayers.Control.KeyboardDefaults());
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue