]> git.openstreetmap.org Git - rails.git/commitdiff
Add a scale bar that changes with latitude (from OpenLayers 2.10)
authorAndy Allan <andy@gravitystorm.co.uk>
Tue, 9 Nov 2010 14:18:16 +0000 (14:18 +0000)
committerAndy Allan <andy@gravitystorm.co.uk>
Tue, 9 Nov 2010 14:18:16 +0000 (14:18 +0000)
public/javascripts/map.js

index 0668b8ab055c532460f0062ad22c1b8768657af9..090d4abc258398ae227f8ff99b3a130de740f438 100644 (file)
@@ -23,7 +23,8 @@ function createMap(divName, options) {
          new OpenLayers.Control.LayerSwitcher(),
          new OpenLayers.Control.Navigation(),
          new OpenLayers.Control.PanZoom(),
-         new OpenLayers.Control.PanZoomBar()
+         new OpenLayers.Control.PanZoomBar(),
+         new OpenLayers.Control.ScaleLine({geodesic: true})
       ],
       units: "m",
       maxResolution: 156543.0339,