diff --git a/lib/OpenLayers/Control/Scale.js b/lib/OpenLayers/Control/Scale.js index de7ee41b07..bde35edfc2 100644 --- a/lib/OpenLayers/Control/Scale.js +++ b/lib/OpenLayers/Control/Scale.js @@ -53,8 +53,9 @@ OpenLayers.Control.Scale.prototype = } else if (scale >= 950000) { scale = Math.round(scale / 1000000) + "M"; } else { - scale = Math.round(scale / 100) * 100; - } + scale = Math.round(scale); + } + this.element.innerHTML = "Scale = 1 : " + scale; }, diff --git a/tests/list-tests.html b/tests/list-tests.html index 40d524a32a..8f2172d2fe 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -31,5 +31,6 @@
  • test_Control_PanZoom.html
  • test_Control_PanZoomBar.html
  • test_Control_Permalink.html
  • +
  • test_Control_Scale.html
  • test_Map.html
  • diff --git a/tests/test_Control_Scale.html b/tests/test_Control_Scale.html new file mode 100644 index 0000000000..995247730f --- /dev/null +++ b/tests/test_Control_Scale.html @@ -0,0 +1,47 @@ + + + + + + + Scale
    +
    + +