diff --git a/assets/src/modules/config/BaseLayer.js b/assets/src/modules/config/BaseLayer.js index 9fdc9a74ad..5297f3ef3d 100644 --- a/assets/src/modules/config/BaseLayer.js +++ b/assets/src/modules/config/BaseLayer.js @@ -911,19 +911,6 @@ export class BaseLayersConfig { extendedCfg[layerCfg.name].layerConfig = layerCfg; } - // Define startup base layer based on names from tree - this._startupBaselayer = null; - if (names.length != 0) { - this._startupBaselayer = names[0]; - } - - // Add names from keys - for (const key in extendedCfg) { - if (names.indexOf(key) == -1) { - names.push(key); - } - } - // Add base layer as project default background color // Get provided default background color index from options const default_background_color_index = options.hasOwnProperty('default_background_color_index') ? options.default_background_color_index : -1; @@ -949,12 +936,12 @@ export class BaseLayersConfig { if (i <= baselayersGroupIndex) { continue; } - if (baselayerCfg.type != 'group') { - background_color_index += 1 - } if (i > global_background_color_index) { break; } + if (baselayerCfg.type != 'group') { + background_color_index += 1 + } if (baselayerCfg.name == 'project-background-color') { background_color_index += 1 } @@ -970,6 +957,19 @@ export class BaseLayersConfig { } } + // Define startup base layer based on names from tree + this._startupBaselayer = null; + if (names.length != 0) { + this._startupBaselayer = names[0]; + } + + // Add names from keys + for (const key in extendedCfg) { + if (names.indexOf(key) == -1) { + names.push(key); + } + } + this._names = []; this._configs = []; for (const key of names) { diff --git a/tests/js-units/data/backgrounds-capabilities.json b/tests/js-units/data/backgrounds-capabilities.json index 3828342893..9905767edb 100644 --- a/tests/js-units/data/backgrounds-capabilities.json +++ b/tests/js-units/data/backgrounds-capabilities.json @@ -1269,8 +1269,8 @@ "noSubsets": false }, { - "Name": "WM_T_S_are_on_demo_lizmap_com", - "Title": "=== WM[T]S are on demo.lizmap.com ===", + "Name": "WM_T_S_are_on_liz_lizmap_com", + "Title": "=== WM[T]S are on liz.lizmap.com ===", "CRS": [ "CRS:84", "EPSG:3857", @@ -1318,7 +1318,7 @@ "noSubsets": false }, { - "Name": "WMTS_demo_lizmap_com_communes", + "Name": "WMTS_liz_lizmap_com_communes", "Title": "WMTS single external", "CRS": [ "CRS:84", @@ -1369,7 +1369,7 @@ "LegendURL": [ { "Format": "image/png", - "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=base_layers_user_defined&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=WMTS_demo_lizmap_com_communes&FORMAT=image/png&STYLE=default&SLD_VERSION=1.1.0", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=base_layers_user_defined&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=WMTS_liz_lizmap_com_communes&FORMAT=image/png&STYLE=default&SLD_VERSION=1.1.0", "size": [ null, null diff --git a/tests/js-units/data/backgrounds-config.json b/tests/js-units/data/backgrounds-config.json index 1ae3d043cd..16a2f96d03 100644 --- a/tests/js-units/data/backgrounds-config.json +++ b/tests/js-units/data/backgrounds-config.json @@ -644,11 +644,11 @@ "shortname": "local_raster", "layerType": "raster" }, - "=== WM[T]S are on demo.lizmap.com ===": { - "id": "=== WM[T]S are on demo.lizmap.com ===", - "name": "=== WM[T]S are on demo.lizmap.com ===", + "=== WM[T]S are on liz.lizmap.com ===": { + "id": "=== WM[T]S are on liz.lizmap.com ===", + "name": "=== WM[T]S are on liz.lizmap.com ===", "type": "group", - "title": "=== WM[T]S are on demo.lizmap.com ===", + "title": "=== WM[T]S are on liz.lizmap.com ===", "abstract": "", "link": "", "minScale": 1, @@ -668,7 +668,7 @@ "imageFormat": "image/png", "cached": "False", "clientCacheExpiration": 300, - "shortname": "WM_T_S_are_on_demo_lizmap_com" + "shortname": "WM_T_S_are_on_liz_lizmap_com" }, "WMTS single external": { "id": "Communes_37a6346a_94e4_4071_8fa5_94f406319b05", @@ -701,7 +701,7 @@ "imageFormat": "image/png", "cached": "False", "clientCacheExpiration": 300, - "shortname": "WMTS_demo_lizmap_com_communes", + "shortname": "WMTS_liz_lizmap_com_communes", "layerType": "raster", "externalWmsToggle": "True", "externalAccess": { @@ -711,7 +711,7 @@ "layers": "Communes", "styles": "default", "tileMatrixSet": "EPSG:3857", - "url": "https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=cypress&project=wmts&SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities", + "url": "https://liz.lizmap.com/tests/index.php/lizmap/service?repository=testse2elwc&project=wmts&SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities", "type": "wmts" } }, @@ -750,7 +750,7 @@ "layerType": "raster" }, "WMS grouped external": { - "id": "WMS_demo_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2", + "id": "WMS_liz_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2", "name": "WMS grouped external", "type": "layer", "extent": [ @@ -789,7 +789,7 @@ "format": "image/png;%20mode%3D8bit", "layers": "commune", "styles": "d%C3%A9faut", - "url": "https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf&VERSION=1.3.0" + "url": "https://liz.lizmap.com/tests/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf&VERSION=1.3.0" }, "shortname": "WMST_lizmap_com_MTP", "layerType": "raster" diff --git a/tests/js-units/data/display_in_legend-capabilities.json b/tests/js-units/data/display_in_legend-capabilities.json new file mode 100644 index 0000000000..f4b16019ab --- /dev/null +++ b/tests/js-units/data/display_in_legend-capabilities.json @@ -0,0 +1,1013 @@ +{ + "version": "1.3.0", + "Service": { + "Name": "WMS", + "Title": "display_in_legend", + "KeywordList": [ + "infoMapAccessService" + ], + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend", + "Fees": "conditions unknown", + "AccessConstraints": "None", + "MaxWidth": 3000, + "MaxHeight": 3000 + }, + "Capability": { + "Request": { + "GetCapabilities": { + "Format": [ + "text/xml" + ], + "DCPType": [ + { + "HTTP": { + "Get": { + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&" + } + } + } + ] + }, + "GetMap": { + "Format": [ + "image/jpeg", + "image/png", + "image/png; mode=16bit", + "image/png; mode=8bit", + "image/png; mode=1bit", + "application/dxf" + ], + "DCPType": [ + { + "HTTP": { + "Get": { + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&" + } + } + } + ] + }, + "GetFeatureInfo": { + "Format": [ + "text/plain", + "text/html", + "text/xml", + "application/vnd.ogc.gml", + "application/vnd.ogc.gml/3.1.1", + "application/json", + "application/geo+json" + ], + "DCPType": [ + { + "HTTP": { + "Get": { + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&" + } + } + } + ] + } + }, + "Exception": [ + "XML" + ], + "Layer": { + "Name": "display_in_legend", + "Title": "display_in_legend", + "KeywordList": [ + "infoMapAccessService" + ], + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.713561, + 43.530455, + 3.983683, + 43.698267 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 757534.224, + 6270414.167, + 779545.402, + 6289297.823 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.530455, + 3.713561, + 43.698267, + 3.983683 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 413391.72, + 5393064.326, + 443461.504, + 5418866.321 + ], + "res": [ + null, + null + ] + } + ], + "Layer": [ + { + "Name": "PostgreSQL", + "Title": "PostgreSQL", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.789665, + 43.556977, + 3.951226, + 43.688848 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 763680.743, + 6273420.337, + 776885.432, + 6288219.124 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.556977, + 3.789665, + 43.688848, + 3.951226 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 421863.582, + 5397137.417, + 439848.466, + 5417416.25 + ], + "res": [ + null, + null + ] + } + ], + "Layer": [ + { + "Name": "townhalls_pg", + "Title": "townhalls_pg", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.789665, + 43.563383, + 3.949294, + 43.674094 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 763818.784, + 6274272.637, + 776574.447, + 6286437.049 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.563383, + 3.789665, + 43.674094, + 3.949294 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 421863.582, + 5398121.565, + 439633.334, + 5415145.081 + ], + "res": [ + null, + null + ] + } + ], + "Style": [ + { + "Name": "défaut", + "Title": "défaut", + "LegendURL": [ + { + "Format": "image/png", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=townhalls_pg&FORMAT=image/png&STYLE=défaut&SLD_VERSION=1.1.0", + "size": [ + null, + null + ] + } + ] + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + }, + { + "Name": "shop_bakery_pg", + "Title": "shop_bakery_pg", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.799863, + 43.558178, + 3.949082, + 43.687649 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 764504.477, + 6273562.185, + 776710.513, + 6288083.793 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.558178, + 3.799863, + 43.687649, + 3.949082 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 422998.842, + 5397322.007, + 439609.759, + 5417231.655 + ], + "res": [ + null, + null + ] + } + ], + "Style": [ + { + "Name": "défaut", + "Title": "défaut", + "LegendURL": [ + { + "Format": "image/png", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=shop_bakery_pg&FORMAT=image/png&STYLE=défaut&SLD_VERSION=1.1.0", + "size": [ + null, + null + ] + } + ] + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + }, + { + "Name": "group-without-children", + "Title": "group-without-children", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + -0.000001, + -0.000001, + 0.000001, + 0.000001 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 253531.13, + 909838.93, + 253531.131, + 909838.931 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + -0.000001, + -0.000001, + 0.000001, + 0.000001 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + -0.001, + -0.001, + 0.001, + 0.001 + ], + "res": [ + null, + null + ] + } + ], + "queryable": false, + "opaque": false, + "noSubsets": false + }, + { + "Name": "Shapefiles", + "Title": "Shapefiles", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.73825, + 43.536589, + 3.959136, + 43.689297 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 759534.215, + 6271114.247, + 777552.196, + 6288276.711 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.536589, + 3.73825, + 43.689297, + 3.959136 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 416140.171, + 5394006.188, + 440728.899, + 5417485.34 + ], + "res": [ + null, + null + ] + } + ], + "Layer": [ + { + "Name": "POIs", + "Title": "POIs", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.765288, + 43.548188, + 3.956855, + 43.68479 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 761719.387, + 6272424.216, + 777352.161, + 6287773.573 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.548188, + 3.765288, + 43.68479, + 3.956855 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 419149.999, + 5395787.545, + 440474.995, + 5416791.433 + ], + "res": [ + null, + null + ] + } + ], + "Layer": [ + { + "Name": "townhalls_EPSG2154", + "Title": "townhalls_EPSG2154", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.779085, + 43.548188, + 3.956855, + 43.683851 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 762980.31, + 6272590.903, + 777171.353, + 6287513.127 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.548188, + 3.779085, + 43.683851, + 3.956855 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 420685.875, + 5395787.545, + 440474.994, + 5416646.945 + ], + "res": [ + null, + null + ] + } + ], + "Style": [ + { + "Name": "défaut", + "Title": "défaut", + "LegendURL": [ + { + "Format": "image/png", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=townhalls_EPSG2154&FORMAT=image/png&STYLE=défaut&SLD_VERSION=1.1.0", + "size": [ + null, + null + ] + } + ] + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + }, + { + "Name": "shop_bakery", + "Title": "shop_bakery", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.766921, + 43.561103, + 3.942209, + 43.683413 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 761852.599, + 6273860.752, + 776151.14, + 6287606.392 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.561103, + 3.766921, + 43.683413, + 3.942209 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 419331.827, + 5397771.202, + 438844.654, + 5416579.523 + ], + "res": [ + null, + null + ] + } + ], + "Style": [ + { + "Name": "défaut", + "Title": "défaut", + "LegendURL": [ + { + "Format": "image/png", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=shop_bakery&FORMAT=image/png&STYLE=défaut&SLD_VERSION=1.1.0", + "size": [ + null, + null + ] + } + ] + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + }, + { + "Name": "polygons", + "Title": "polygons", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + 3.740176, + 43.538226, + 3.950358, + 43.687664 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 759691.174, + 6271297.6, + 776840.344, + 6288086.73 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + 43.538226, + 3.740176, + 43.687664, + 3.950358 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + 416354.498, + 5394257.51, + 439751.819, + 5417234.009 + ], + "res": [ + null, + null + ] + } + ], + "Style": [ + { + "Name": "défaut", + "Title": "défaut", + "LegendURL": [ + { + "Format": "image/png", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=polygons&FORMAT=image/png&STYLE=défaut&SLD_VERSION=1.1.0", + "size": [ + null, + null + ] + } + ] + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + }, + { + "Name": "baselayers", + "Title": "baselayers", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + -179.658803, + -86.92786, + 179.801668, + 81.812853 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + -160899463.134, + -148842609.625, + 161953281.226, + 113654184.546 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + -86.92786, + -179.658803, + 81.812853, + 179.801668 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + -19999526.415, + -23080947.792, + 20015430.063, + 16819817.437 + ], + "res": [ + null, + null + ] + } + ], + "Layer": [ + { + "Name": "project-background-color", + "Title": "project-background-color", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + -0.000001, + -0.000001, + 0.000001, + 0.000001 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + 253531.13, + 909838.93, + 253531.131, + 909838.931 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + -0.000001, + -0.000001, + 0.000001, + 0.000001 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + -0.001, + -0.001, + 0.001, + 0.001 + ], + "res": [ + null, + null + ] + } + ], + "queryable": false, + "opaque": false, + "noSubsets": false + }, + { + "Name": "OpenStreetMap", + "Title": "OpenStreetMap", + "CRS": [ + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154", + "CRS:84", + "EPSG:3857", + "EPSG:4326", + "EPSG:2154" + ], + "EX_GeographicBoundingBox": [ + -180, + -85.051129, + 180, + 85.051129 + ], + "BoundingBox": [ + { + "crs": "EPSG:2154", + "extent": [ + -113604282.603, + -101583928.923, + 114773529.379, + 83711011.772 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:4326", + "extent": [ + -85.051129, + -180, + 85.051129, + 180 + ], + "res": [ + null, + null + ] + }, + { + "crs": "EPSG:3857", + "extent": [ + -20037508.343, + -20037508.343, + 20037508.343, + 20037508.343 + ], + "res": [ + null, + null + ] + } + ], + "Style": [ + { + "Name": "défaut", + "Title": "défaut", + "LegendURL": [ + { + "Format": "image/png", + "OnlineResource": "http://localhost:8130/index.php/lizmap/service?repository=testsrepository&project=display_in_legend&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=OpenStreetMap&FORMAT=image/png&STYLE=défaut&SLD_VERSION=1.1.0", + "size": [ + null, + null + ] + } + ] + } + ], + "Attribution": { + "Title": "© Contributeurs OpenStreetMap", + "OnlineResource": "https://openstreetmap.org" + }, + "queryable": true, + "opaque": false, + "noSubsets": false + } + ], + "queryable": true, + "opaque": false, + "noSubsets": false + } + ] + } + } +} diff --git a/tests/js-units/data/display_in_legend-config.json b/tests/js-units/data/display_in_legend-config.json new file mode 100644 index 0000000000..2927a13f5e --- /dev/null +++ b/tests/js-units/data/display_in_legend-config.json @@ -0,0 +1,535 @@ +{ + "locateByLayer": {}, + "formFilterLayers": {}, + "attributeLayers": {}, + "layers": { + "PostgreSQL": { + "id": "PostgreSQL", + "name": "PostgreSQL", + "type": "group", + "title": "PostgreSQL", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "PostgreSQL", + "cleanname": "PostgreSQL" + }, + "townhalls_pg": { + "id": "townhalls_pg_f97f7bce_29dc_469b_a5ef_baaf25ba1b31", + "name": "townhalls_pg", + "type": "layer", + "geometryType": "point", + "extent": [ + 763818.7841061667, + 6274272.637559084, + 776574.4468899481, + 6286437.048030715 + ], + "crs": "EPSG:2154", + "title": "townhalls_pg", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "townhalls_pg", + "layerType": "vector", + "webDavFields": [], + "cleanname": "townhalls_pg", + "typename": "townhalls_pg" + }, + "shop_bakery_pg": { + "id": "shop_bakery_pg_403084fe_041d_4ede_a2dc_cd9866a53623", + "name": "shop_bakery_pg", + "type": "layer", + "geometryType": "point", + "extent": [ + 3.799863257862021, + 43.55817897089505, + 3.949081648249752, + 43.68764871034933 + ], + "crs": "EPSG:4326", + "title": "shop_bakery_pg", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "shop_bakery_pg", + "layerType": "vector", + "webDavFields": [], + "cleanname": "shop_bakery_pg", + "typename": "shop_bakery_pg" + }, + "group-without-children": { + "id": "group-without-children", + "name": "group-without-children", + "type": "group", + "title": "group-without-children", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "group-without-children", + "cleanname": "group_without_children" + }, + "Shapefiles": { + "id": "Shapefiles", + "name": "Shapefiles", + "type": "group", + "title": "Shapefiles", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "Shapefiles", + "cleanname": "Shapefiles" + }, + "POIs": { + "id": "POIs", + "name": "POIs", + "type": "group", + "title": "POIs", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "POIs", + "cleanname": "POIs" + }, + "townhalls_EPSG2154": { + "id": "townhalls_EPSG2154_efe320fb_677c_45e4_8f32_aa1fe10cc3ce", + "name": "townhalls_EPSG2154", + "type": "layer", + "geometryType": "point", + "extent": [ + 762980.3105228557, + 6272590.903038543, + 777171.3526259739, + 6287513.126682519 + ], + "crs": "EPSG:2154", + "title": "townhalls_EPSG2154", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "townhalls_EPSG2154", + "showFeatureCount": "True", + "layerType": "vector", + "webDavFields": [], + "cleanname": "townhalls_EPSG2154", + "typename": "townhalls_EPSG2154" + }, + "shop_bakery": { + "id": "points_241855da_7b4f_45e2_a5ac_c84f869f9f9d", + "name": "shop_bakery", + "type": "layer", + "geometryType": "point", + "extent": [ + 3.7669219, + 43.5611031, + 3.9422086, + 43.6834124 + ], + "crs": "EPSG:4326", + "title": "shop_bakery", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "shop_bakery", + "showFeatureCount": "True", + "layerType": "vector", + "webDavFields": [], + "cleanname": "shop_bakery", + "typename": "shop_bakery" + }, + "polygons": { + "id": "polygons_c9ff77e3_8747_4188_be43_421c8605ee3d", + "name": "polygons", + "type": "layer", + "geometryType": "polygon", + "extent": [ + 416354.4989291718, + 5394257.51030597, + 439751.8187472364, + 5417234.008469306 + ], + "crs": "EPSG:3857", + "title": "polygons", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "False", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "polygons", + "layerType": "vector", + "webDavFields": [], + "cleanname": "polygons", + "typename": "polygons" + }, + "baselayers": { + "id": "baselayers", + "name": "baselayers", + "type": "group", + "title": "baselayers", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "baselayers", + "mutuallyExclusive": "True", + "cleanname": "baselayers" + }, + "project-background-color": { + "id": "project-background-color", + "name": "project-background-color", + "type": "group", + "title": "project-background-color", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "project-background-color", + "mutuallyExclusive": "True", + "cleanname": "project_background_color" + }, + "OpenStreetMap": { + "id": "OpenStreetMap_d244c290_73fa_4469_93ae_c3e29d48072d", + "name": "OpenStreetMap", + "type": "layer", + "extent": [ + -20037508.342789244, + -20037508.342789248, + 20037508.342789244, + 20037508.342789248 + ], + "crs": "EPSG:3857", + "title": "OpenStreetMap", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300, + "shortname": "OpenStreetMap", + "layerType": "raster", + "externalWmsToggle": "True", + "externalAccess": { + "crs": "EPSG:3857", + "format": "", + "type": "xyz", + "url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png", + "zmax": "19", + "zmin": "0" + }, + "cleanname": "OpenStreetMap" + } + }, + "timemanagerLayers": {}, + "atlas": { + "layers": [] + }, + "tooltipLayers": {}, + "layouts": { + "config": { + "default_popup_print": false + }, + "list": [ + { + "layout": "impression", + "enabled": true, + "formats_available": [ + "pdf" + ], + "default_format": "pdf", + "dpi_available": [ + "100" + ], + "default_dpi": "100" + } + ] + }, + "loginFilteredLayers": {}, + "filter_by_polygon": { + "config": { + "polygon_layer_id": "polygons_c9ff77e3_8747_4188_be43_421c8605ee3d", + "group_field": "id", + "filter_by_user": false + }, + "layers": [] + }, + "datavizLayers": { + "layers": [], + "dataviz": [], + "locale": "fr_FR" + }, + "metadata": { + "qgis_desktop_version": 32815, + "lizmap_plugin_version_str": "4.3.3", + "lizmap_plugin_version": 40303, + "lizmap_web_client_target_version": 30700, + "lizmap_web_client_target_status": "Stable", + "instance_target_url": "https://demo.lizmap.com/lizmap/", + "instance_target_repository": "cypress" + }, + "warnings": {}, + "options": { + "projection": { + "proj4": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs", + "ref": "EPSG:3857" + }, + "bbox": [ + "413391.72071232297457755", + "5393064.32681021839380264", + "443461.50342042162083089", + "5418866.3203213419765234" + ], + "mapScales": [ + 10000, + 25000, + 50000, + 100000, + 250000, + 500000 + ], + "minScale": 1, + "maxScale": 1000000000, + "use_native_zoom_levels": false, + "hide_numeric_scale_value": true, + "initialExtent": [ + 413391.7207, + 5393064.3268, + 443461.5034, + 5418866.3203 + ], + "popupLocation": "dock", + "pointTolerance": 25, + "lineTolerance": 10, + "polygonTolerance": 5, + "tmTimeFrameSize": 10, + "tmTimeFrameType": "seconds", + "tmAnimationFrameLength": 1000, + "datavizLocation": "dock", + "theme": "dark", + "fixed_scale_overview_map": true, + "dataviz_drag_drop": [], + "default_background_color_index": 0, + "exportLayers": "True", + "wmsMaxWidth": "3000", + "wmsMaxHeight": "3000", + "searches": [ + { + "type": "Fts", + "service": "lizmapFts", + "url": "/index.php/lizmap/searchFts/get" + } + ], + "hasOverview": false, + "qgisProjectProjection": { + "proj4": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs", + "ref": "EPSG:3857" + } + }, + "relations": { + "pivot": [] + }, + "printTemplates": [ + { + "title": "impression", + "width": 297, + "height": 210, + "maps": [ + { + "id": "map0", + "uuid": "{adb226d1-aa9b-4b9d-99ff-ec7603092d0f}", + "width": 288, + "height": 202 + } + ], + "labels": [], + "atlas": { + "enabled": "0", + "coverageLayer": "" + } + } + ] +} diff --git a/tests/js-units/node/config/baselayer.test.js b/tests/js-units/node/config/baselayer.test.js index 22356c16bd..498f397ea3 100644 --- a/tests/js-units/node/config/baselayer.test.js +++ b/tests/js-units/node/config/baselayer.test.js @@ -696,7 +696,7 @@ describe('BaseLayersConfig', function () { //"=== LOCAL LAYERS ===", "local vector layer", "local raster layer", - //"=== WM[T]S are on demo.lizmap.com ===", + //"=== WM[T]S are on liz.lizmap.com ===", "WMTS single external", "WMS single internal", "WMS grouped external", @@ -791,7 +791,7 @@ describe('BaseLayersConfig', function () { expect(wmtsBl).to.be.instanceOf(WmtsBaseLayerConfig) expect(wmtsBl.name).to.be.eq('WMTS single external') expect(wmtsBl.title).to.be.eq('WMTS single external') - expect(wmtsBl.url).to.be.eq('https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=cypress&project=wmts') + expect(wmtsBl.url).to.be.eq('https://liz.lizmap.com/tests/index.php/lizmap/service?repository=testse2elwc&project=wmts') expect(wmtsBl.layer).to.be.eq('Communes') expect(wmtsBl.format).to.be.eq('image/png') expect(wmtsBl.style).to.be.eq('default') @@ -808,7 +808,7 @@ describe('BaseLayersConfig', function () { "layers": "Communes", "styles": "default", "tileMatrixSet": "EPSG:3857", - "url": "https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=cypress&project=wmts&SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities", + "url": "https://liz.lizmap.com/tests/index.php/lizmap/service?repository=testse2elwc&project=wmts&SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities", "type": "wmts" }) @@ -818,7 +818,7 @@ describe('BaseLayersConfig', function () { expect(wmsBl).to.be.instanceOf(WmsBaseLayerConfig) expect(wmsBl.name).to.be.eq('WMS grouped external') expect(wmsBl.title).to.be.eq('WMS grouped external') - expect(wmsBl.url).to.be.eq('https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf') + expect(wmsBl.url).to.be.eq('https://liz.lizmap.com/tests/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf') expect(wmsBl.layers).to.be.eq('commune') expect(wmsBl.format).to.be.eq('image/png; mode=8bit') expect(wmsBl.styles).to.be.eq('défaut') @@ -834,7 +834,7 @@ describe('BaseLayersConfig', function () { "format": "image/png;%20mode%3D8bit", "layers": "commune", "styles": "d%C3%A9faut", - "url": "https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf&VERSION=1.3.0" + "url": "https://liz.lizmap.com/tests/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf&VERSION=1.3.0" }) }) @@ -905,12 +905,14 @@ describe('BaseLayersConfig', function () { //"=== LOCAL LAYERS ===", "local vector layer", "local raster layer", - //"=== WM[T]S are on demo.lizmap.com ===", + //"=== WM[T]S are on liz.lizmap.com ===", "WMTS single external", "WMS single internal", "WMS grouped external", ]); + expect(baseLayers.startupBaselayerName).to.be.eq("Stamen Watercolor") + const baseLayersWithoutOptions = new BaseLayersConfig({}, {}, layers, blGroup) expect(baseLayersWithoutOptions.baseLayerNames) .to.have.length(11) // still 11 @@ -927,11 +929,13 @@ describe('BaseLayersConfig', function () { //"=== LOCAL LAYERS ===", "local vector layer", "local raster layer", - //"=== WM[T]S are on demo.lizmap.com ===", + //"=== WM[T]S are on liz.lizmap.com ===", "WMTS single external", "WMS single internal", "WMS grouped external", ]); + + expect(baseLayers.startupBaselayerName).to.be.eq("Stamen Watercolor") }) it('startupBaseLayer', function () { @@ -980,6 +984,67 @@ describe('BaseLayersConfig', function () { expect(unknownStratupBl.startupBaselayerName).to.be.null }) + it('startupBaseLayer from baselayers user defined', function () { + const capabilities = JSON.parse(readFileSync('./data/display_in_legend-capabilities.json', 'utf8')); + expect(capabilities).to.not.be.undefined + expect(capabilities.Capability).to.not.be.undefined + const config = JSON.parse(readFileSync('./data/display_in_legend-config.json', 'utf8')); + expect(config).to.not.be.undefined + + const layers = new LayersConfig(config.layers); + + // Removed empty groups from capabilities like with QGIS Server 3.34 + for(const wmsCapaLayer of capabilities.Capability.Layer.Layer) { + if (!wmsCapaLayer.hasOwnProperty('Layer') || wmsCapaLayer.Layer.length === 0) { + continue; + } + if (wmsCapaLayer.Name != 'baselayers') { + continue; + } + wmsCapaLayer.Layer = wmsCapaLayer.Layer.filter((baseLayer) => { + const cfg = layers.getLayerConfigByWmsName(baseLayer.Name); + if (cfg == null) { + return false; + } + if (cfg.type != 'group') { + return true; + } + if (!baseLayer.hasOwnProperty('Layer') || baseLayer.Layer.length === 0) { + return false; + } + return true; + }); + } + + const root = buildLayerTreeConfig(capabilities.Capability.Layer, layers); + + expect(root).to.be.instanceOf(LayerTreeGroupConfig) + expect(root.name).to.be.eq('root') + expect(root.type).to.be.eq('group') + expect(root.level).to.be.eq(0) + expect(root.childrenCount).to.be.eq(4) + + const blGroup = root.children[3]; + expect(blGroup).to.be.instanceOf(LayerTreeGroupConfig) + expect(blGroup.name).to.be.eq('baselayers') + expect(blGroup.type).to.be.eq('group') + expect(blGroup.level).to.be.eq(1) + // project-background-color not in capabilities + expect(blGroup.childrenCount).to.be.eq(1) + + const baseLayers = new BaseLayersConfig({}, {}, layers, blGroup) + + expect(baseLayers.baseLayerNames) + .to.have.length(2) // still 11 + .that.be.deep.eq([ + "project-background-color", + "OpenStreetMap" + ]) + + expect(baseLayers.startupBaselayerName).to.be.eq("project-background-color") + + }) + it('ValidationError', function () { try { new BaseLayersConfig() diff --git a/tests/js-units/node/config/layerTree.test.js b/tests/js-units/node/config/layerTree.test.js index c14a4320f9..b0c0f5ff0b 100644 --- a/tests/js-units/node/config/layerTree.test.js +++ b/tests/js-units/node/config/layerTree.test.js @@ -436,9 +436,9 @@ describe('buildLayerTreeConfig', function () { const wmts = baselayersGetChildren.next().value; expect(wmts.type).to.be.eq('layer') - expect(wmts.name).to.be.eq('=== WM[T]S are on demo.lizmap.com ===') + expect(wmts.name).to.be.eq('=== WM[T]S are on liz.lizmap.com ===') expect(wmts.layerConfig.type).to.be.eq('group') - expect(wmts.wmsName).to.be.eq('WM_T_S_are_on_demo_lizmap_com') + expect(wmts.wmsName).to.be.eq('WM_T_S_are_on_liz_lizmap_com') expect(wmts.wmsStyles).to.have.length(1) expect(wmts.wmsStyles[0].wmsName).to.be.eq('') expect(wmts.wmsStyles[0].wmsTitle).to.be.eq('Default') @@ -447,7 +447,7 @@ describe('buildLayerTreeConfig', function () { expect(wmtsSingle.type).to.be.eq('layer') expect(wmtsSingle.name).to.be.eq('WMTS single external') expect(wmtsSingle.layerConfig.type).to.be.eq('layer') - expect(wmtsSingle.wmsName).to.be.eq('WMTS_demo_lizmap_com_communes') + expect(wmtsSingle.wmsName).to.be.eq('WMTS_liz_lizmap_com_communes') expect(wmtsSingle.wmsStyles).to.have.length(1) expect(wmtsSingle.wmsStyles[0].wmsName).to.be.eq('default') expect(wmtsSingle.wmsStyles[0].wmsTitle).to.be.eq('default') diff --git a/tests/qgis-projects/tests/base_layers_user_defined.qgs b/tests/qgis-projects/tests/base_layers_user_defined.qgs index f768659c8c..63b23f03d7 100644 --- a/tests/qgis-projects/tests/base_layers_user_defined.qgs +++ b/tests/qgis-projects/tests/base_layers_user_defined.qgs @@ -154,14 +154,14 @@ - + + - + @@ -175,7 +175,7 @@ - + @@ -210,7 +210,7 @@ polygons_6c53e302_45e9_42a3_b2e7_60171f517d02 raster_78572dfa_41b3_42da_a9c6_933ead8bad8f Communes_37a6346a_94e4_4071_8fa5_94f406319b05 - WMS_demo_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2 + WMS_liz_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2 OpenStreetMap_3533874f_acee_499a_889a_dca4be39b8ba polygons_bc568c03_fefb_4911_bd8e_0efe2d005dcc IGN_G_oplateforme__PLAN_IGN__7b07be35_e655_4d6c_8b7d_8092096182b1 @@ -314,7 +314,7 @@ - + @@ -409,8 +409,8 @@ 43.6537500000000307 Communes_37a6346a_94e4_4071_8fa5_94f406319b05 - crs=EPSG:3857&dpiMode=7&format=image/png&layers=Communes&styles=default&tileMatrixSet=EPSG:3857&url=https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository%3Dcypress%26project%3Dwmts%26SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities - WMTS_demo_lizmap_com_communes + crs=EPSG:3857&dpiMode=7&format=image/png&layers=Communes&styles=default&tileMatrixSet=EPSG:3857&url=https://liz.lizmap.com/tests/index.php/lizmap/service?repository%3Dtestse2elwc%26project%3Dwmts%26SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities + WMTS_liz_lizmap_com_communes @@ -54494,7 +54494,7 @@ 3.94223231594692347 43.65374993394283365 - WMS_demo_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2 + WMS_liz_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2 contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/png;%20mode%3D8bit&layers=commune&styles=d%C3%A9faut&url=https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository%3Dmiscellaneous%26project%3Dflatgeobuf%26VERSION%3D1.3.0 WMST_lizmap_com_MTP @@ -57886,7 +57886,7 @@ def my_form_open(dialog, layer, feature): - + diff --git a/tests/qgis-projects/tests/base_layers_user_defined.qgs.cfg b/tests/qgis-projects/tests/base_layers_user_defined.qgs.cfg index cf4c2af2bb..905215aa42 100644 --- a/tests/qgis-projects/tests/base_layers_user_defined.qgs.cfg +++ b/tests/qgis-projects/tests/base_layers_user_defined.qgs.cfg @@ -622,11 +622,11 @@ "cached": "False", "clientCacheExpiration": 300 }, - "=== WM[T]S are on demo.lizmap.com ===": { - "id": "=== WM[T]S are on demo.lizmap.com ===", - "name": "=== WM[T]S are on demo.lizmap.com ===", + "=== WM[T]S are on liz.lizmap.com ===": { + "id": "=== WM[T]S are on liz.lizmap.com ===", + "name": "=== WM[T]S are on liz.lizmap.com ===", "type": "group", - "title": "=== WM[T]S are on demo.lizmap.com ===", + "title": "=== WM[T]S are on liz.lizmap.com ===", "abstract": "", "link": "", "minScale": 1, @@ -715,7 +715,7 @@ "clientCacheExpiration": 300 }, "WMS grouped external": { - "id": "WMS_demo_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2", + "id": "WMS_liz_lizmap_com_communes_1d5559c6_3210_42c0_b4ee_227d19588dc2", "name": "WMS grouped external", "type": "layer", "extent": [ @@ -755,7 +755,7 @@ "format": "image/png;%20mode%3D8bit", "layers": "commune", "styles": "d%C3%A9faut", - "url": "https://demo.lizmap.com/lizmap/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf&VERSION=1.3.0" + "url": "https://liz.lizmap.com/tests/index.php/lizmap/service?repository=miscellaneous&project=flatgeobuf&VERSION=1.3.0" } }, "=== VECTOR TILES ===": {