From 480a1d2f637b4c7eeebe4229df587d2a3dc63cb8 Mon Sep 17 00:00:00 2001 From: azarz Date: Wed, 30 Aug 2023 16:24:24 +0200 Subject: [PATCH] fix tileMatrixLimits bug --- core/wmts_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/wmts_parser.py b/core/wmts_parser.py index 2cf57b6..e66fca3 100644 --- a/core/wmts_parser.py +++ b/core/wmts_parser.py @@ -71,6 +71,9 @@ def _parseLayer(layer, all_tms, key): layer_config["wmtsOptions"]["tileMatrixSetLink"] = layer["TileMatrixSetLink"]["TileMatrixSet"] layer_config["wmtsOptions"]["tileMatrixSetLimits"] = {} + if not isinstance(layer["TileMatrixSetLink"]["TileMatrixSetLimits"]["TileMatrixLimits"], list): + layer["TileMatrixSetLink"]["TileMatrixSetLimits"]["TileMatrixLimits"] = [layer["TileMatrixSetLink"]["TileMatrixSetLimits"]["TileMatrixLimits"]] + for tile_matrix in layer["TileMatrixSetLink"]["TileMatrixSetLimits"]["TileMatrixLimits"]: tile_matrix_set_limit = {} tile_matrix_set_limit["minTileRow"] = tile_matrix["MinTileRow"]