Skip to content

Commit

Permalink
fix bug when only onetms or only one layer in getcap
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Aug 31, 2023
1 parent 7ee1e97 commit 454ce38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/wmts_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ def parseWMTS(dict_capabilities, key):
return wmts_config

def _parseLayers(layers, all_tms, key):
if not isinstance(layers, list):
layers = [layers]
layers_config = {}
for layer in layers:
layer_id, layer_config = _parseLayer(layer, all_tms, key)
layers_config[layer_id] = layer_config
return layers_config

def _parseAllTMS(allTms):
if not isinstance(allTms, list):
allTms = [allTms]
tile_matrix_sets = {}
for tms in allTms:
tms_id, tms_config = _parseTMS(tms)
Expand Down

0 comments on commit 454ce38

Please sign in to comment.