Add a scale control to the map. Closes #51.
This commit is contained in:
parent
4e05d2af72
commit
2b35dadd5f
1 changed files with 10 additions and 8 deletions
|
@ -13,8 +13,10 @@ function createMap(divName) {
|
||||||
new OpenLayers.Control.Attribution(),
|
new OpenLayers.Control.Attribution(),
|
||||||
new OpenLayers.Control.LayerSwitcher(),
|
new OpenLayers.Control.LayerSwitcher(),
|
||||||
new OpenLayers.Control.Navigation(),
|
new OpenLayers.Control.Navigation(),
|
||||||
new OpenLayers.Control.PanZoomBar()
|
new OpenLayers.Control.PanZoomBar(),
|
||||||
]
|
new OpenLayers.Control.ScaleLine()
|
||||||
|
],
|
||||||
|
units: "m"
|
||||||
});
|
});
|
||||||
|
|
||||||
var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
|
var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue