Fix ScaleLine control for Projections in degrees

This commit is contained in:
Pete Schmitt
2018-01-12 14:00:45 -07:00
parent 5cb983c760
commit acacad0515
2 changed files with 16 additions and 1 deletions

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();
}