scaleLine fix update to master

This commit is contained in:
Zsolt Ero
2018-04-10 19:37:05 +02:00
parent 568b3d3559
commit b55f323afe

View File

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