Merge pull request #11395 from mike-000/patch-9

Correct inchesPerMeter and add tests for ScaleBar text
This commit is contained in:
Andreas Hocevar authored and GitHub committed 2020-08-08 14:10:40 +02:00
commit 25f8b4d8d7
2 files changed
+46 -1

No files matched your search

+1 -1
View File
@@ -468,7 +468,7 @@ class ScaleLine extends Control {
);
const dpi = this.dpi_ || DEFAULT_DPI;
const mpu = this.viewState_.projection.getMetersPerUnit();
const inchesPerMeter = 39.37;
const inchesPerMeter = 1000 / 25.4;
return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi;
}