simplify scale calculation

update tests to reflect more accurate calculation
This commit is contained in:
mike-000
2020-08-03 22:19:56 +01:00
parent 425214eb4c
commit 95702648b2
4 changed files with 8 additions and 10 deletions

View File

@@ -263,9 +263,8 @@ class TileWMS extends TileImage {
const mpu = this.getProjection()
? this.getProjection().getMetersPerUnit()
: 1;
const dpi = 25.4 / 0.28;
const inchesPerMeter = 39.37;
baseParams['SCALE'] = resolution * mpu * inchesPerMeter * dpi;
const pixelSize = 0.00028;
baseParams['SCALE'] = (resolution * mpu) / pixelSize;
}
assign(baseParams, params);