Merge pull request #11543 from sweco-dkjesh/main

wmts matrixset null pointer fix and improved handling of Identifier
This commit is contained in:
Andreas Hocevar
2020-09-09 17:51:33 +02:00
committed by GitHub

View File

@@ -459,10 +459,16 @@ export function optionsFromCapabilities(wmtsCap, config) {
//in case of matrix limits, use matrix limits to calculate extent //in case of matrix limits, use matrix limits to calculate extent
if (matrixLimits) { if (matrixLimits) {
selectedMatrixLimit = matrixLimits[matrixLimits.length - 1]; selectedMatrixLimit = matrixLimits[matrixLimits.length - 1];
matrix = find( const m = find(
matrixSetObj.TileMatrix, matrixSetObj.TileMatrix,
(value) => value.Identifier === selectedMatrixLimit.TileMatrix (tileMatrixValue) =>
tileMatrixValue.Identifier === selectedMatrixLimit.TileMatrix ||
matrixSetObj.Identifier + ':' + tileMatrixValue.Identifier ===
selectedMatrixLimit.TileMatrix
); );
if (m) {
matrix = m;
}
} }
const resolution = const resolution =