Control.Scale now correctly reports scales under 1:500. Includes tests. Fixes #503.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2244 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-02-19 22:42:17 +00:00
parent e61204a31e
commit 7d6b3fa0b9
3 changed files with 51 additions and 2 deletions

View File

@@ -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;
},