Fix ScaleLine control for Projections in degrees

This commit is contained in:
Pete Schmitt committed 2018-01-12 14:08:55 -07:00
1 parent 5cb983c760
commit acacad0515
2 files changed
+16 -1

No files matched your search

+1 -1
View File
@@ -176,7 +176,7 @@ ScaleLine.prototype.updateElement_ = function() {
Units.METERS;
let pointResolution =
getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);
if (units != ScaleLineUnits.DEGREES) {
if (projection.getUnits() != Units.DEGREES && units == ScaleLineUnits.METRIC) {
pointResolution *= projection.getMetersPerUnit();
}