Apply projection.getMetersPerUnit() to calculated resolution

This commit is contained in:
Niels Meijer
2020-04-28 18:31:48 +02:00
parent 5740c81c32
commit d395b54605
3 changed files with 321 additions and 2 deletions

View File

@@ -451,7 +451,7 @@ export function optionsFromCapabilities(wmtsCap, config) {
const wrapX = false;
const matrix0 = matrixSetObj.TileMatrix[0];
const resolution = matrix0.ScaleDenominator * 0.00028; // WMTS 1.0.0: standardized rendering pixel size
const resolution = (matrix0.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size
const origin =
projection === getProjection('EPSG:4326')
? [matrix0.TopLeftCorner[1], matrix0.TopLeftCorner[0]]