Merge pull request #7462 from ahocevar/scaleline-meters-per-unit
Respect metersPerUnit in ScaleLine control
This commit is contained in:
@@ -174,6 +174,9 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
|
||||
ol.proj.Units.METERS;
|
||||
var pointResolution =
|
||||
ol.proj.getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);
|
||||
if (units != ol.control.ScaleLineUnits.DEGREES) {
|
||||
pointResolution *= projection.getMetersPerUnit();
|
||||
}
|
||||
|
||||
var nominalCount = this.minWidth_ * pointResolution;
|
||||
var suffix = '';
|
||||
|
||||
Reference in New Issue
Block a user