diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ff29686f..dc57a39cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ #### Data migrations ### Changes +## v1.22.1 + 2023-10-12 +### Changes +- [#949](https://github.com/LayerManager/layman/issues/949) Fix reading map-layer relations from map composition that includes also other than WMS and Vector layers. + ## v1.22.0 2023-10-05 ### Upgrade requirements diff --git a/sample/layman.map/internal_url.json b/sample/layman.map/internal_url.json index 3489e15d7..db4e6efc6 100644 --- a/sample/layman.map/internal_url.json +++ b/sample/layman.map/internal_url.json @@ -87,6 +87,29 @@ "title": "Hranice", "visibility": false, "wmsMaxScale": 0 + }, + { + "metadata": {}, + "visibility": true, + "opacity": 1.0, + "title": "OpenStreetMap", + "className": "XYZ", + "singleTile": false, + "greyscale": false, + "base": false, + "wmsMaxScale": 0, + "maxResolution": null, + "minResolution": 0, + "url": "https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png", + "params": { + "LAYERS": "", + "INFO_FORMAT": "application/vnd.ogc.gml", + "FORMAT": "", + "VERSION": "1.3.0" + }, + "ratio": 1.5, + "dimensions": {}, + "path": "" } ] } diff --git a/src/layman/map/util.py b/src/layman/map/util.py index 1b3fe5abf..3b71a3e82 100644 --- a/src/layman/map/util.py +++ b/src/layman/map/util.py @@ -451,6 +451,8 @@ def get_layers_from_json(map_json, *, x_forwarded_items=None): 'WMS': _get_layer_url_from_wms_json, 'Vector': _get_layer_url_from_vector_json, }.get(class_name) + if not layer_url_getter: + continue layer_url = layer_url_getter(map_layer) if not layer_url: continue