Fix ScaleLine control for Projections in degrees
This commit is contained in:
1 parent
5cb983c760
commit
acacad0515
2 files changed
+16
-1
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user