From 6170b45a52303fc3b6917fc6b1b043f4cda697f7 Mon Sep 17 00:00:00 2001 From: Riccardo Beltrami Date: Wed, 20 Dec 2023 17:07:18 +0100 Subject: [PATCH 1/6] Base structure and test project --- assets/src/legacy/switcher-layers-actions.js | 34 +- assets/src/modules/Config.js | 26 + assets/src/modules/SingleWMSLayer.js | 331 ++ assets/src/modules/map.js | 278 +- assets/src/modules/state/BaseLayer.js | 15 + assets/src/modules/state/LayerTree.js | 9 + assets/src/modules/state/MapLayer.js | 18 + .../qgis-projects/tests/single_wms_image.qgs | 4760 +++++++++++++++++ .../tests/single_wms_image.qgs.cfg | 571 ++ tests/qgis-projects/tests/tests_dataset.sql | 166 + 10 files changed, 6075 insertions(+), 133 deletions(-) create mode 100644 assets/src/modules/SingleWMSLayer.js create mode 100644 tests/qgis-projects/tests/single_wms_image.qgs create mode 100644 tests/qgis-projects/tests/single_wms_image.qgs.cfg diff --git a/assets/src/legacy/switcher-layers-actions.js b/assets/src/legacy/switcher-layers-actions.js index aabd707707..a52d0699d4 100644 --- a/assets/src/legacy/switcher-layers-actions.js +++ b/assets/src/legacy/switcher-layers-actions.js @@ -150,24 +150,26 @@ var lizLayerActionButtons = function() { html+= ''; } } - // Opacity - html+= '
'+lizDict['layer.metadata.opacity.title']+'
'; - html+= '
'; - html+= ''; - - const currentOpacity = lizMap.mainLizmap.state.layersAndGroupsCollection.getLayerOrGroupByName(aName).opacity; - var opacities = lizMap.config.options.layersOpacities; - if(typeof opacities === 'undefined') { - opacities = [0.2, 0.4, 0.6, 0.8, 1]; - } - for ( var i=0, len=opacities.length; i'+opacities[i]*100+''; + const currentLayerState = lizMap.mainLizmap.state.rootMapGroup.getMapLayerByName(aName); + if (!currentLayerState.singleWMSLayer) { + html+= '
'+lizDict['layer.metadata.opacity.title']+'
'; + html+= '
'; + html+= ''; + + const currentOpacity = lizMap.mainLizmap.state.layersAndGroupsCollection.getLayerOrGroupByName(aName).opacity; + var opacities = lizMap.config.options.layersOpacities; + if (typeof opacities === 'undefined') { + opacities = [0.2, 0.4, 0.6, 0.8, 1]; + } + for ( var i=0, len=opacities.length; i'+opacities[i]*100+''; + } + html+= '
'; } - html+= ''; // Export if ( 'exportLayers' in lizMap.config.options diff --git a/assets/src/modules/Config.js b/assets/src/modules/Config.js index 95e84b6a4a..2c0885398a 100644 --- a/assets/src/modules/Config.js +++ b/assets/src/modules/Config.js @@ -68,6 +68,7 @@ export class Config { this._hasFormFilterLayers = true; this._hasLoginFilteredLayers = true; this._hasDatavizConfig = true; + this._singleWMSLayer = null; const theConfig = deepFreeze(cfg); @@ -97,6 +98,7 @@ export class Config { this._theConfig = theConfig; this._theWmsCapabilities = theWmsCapabilities; + this._singleWMSLayer = theConfig._singleWMSLayer; const optionalConfigProperties = [ 'metadata', @@ -124,6 +126,22 @@ export class Config { || Object.getOwnPropertyNames(theConfig.datavizLayers.dataviz).length == 0)) { this._hasDatavizConfig = false; } + + /** + * FIXME + * only for testing purpose! + * + * this event allows the _singleWMSLayer property to be set from external custom js + * and should be removed after implementing the "singleWMSLayer option" on the QGIS lizMap plugin. + * This plugin option will allow to read the _singleWMSLayer property directly from qgs.cfg file + * + * NOTE: this lines cause js-units tests to fail (config and state tests) + */ + lizMap.events.on({ + setSingeWMSLayer: (ev)=>{ + this._singleWMSLayer = ev.singleWMSLayer + } + }) } /** @@ -420,4 +438,12 @@ export class Config { } return this._datavizOptions; } + /** + * Config singleWMSLayer + * + * @type {Boolean} + */ + get singleWMSLayer(){ + return this._singleWMSLayer; + } } diff --git a/assets/src/modules/SingleWMSLayer.js b/assets/src/modules/SingleWMSLayer.js new file mode 100644 index 0000000000..415a63aa32 --- /dev/null +++ b/assets/src/modules/SingleWMSLayer.js @@ -0,0 +1,331 @@ +import { mainLizmap } from './Globals.js' +import map from './map.js' +import { MapLayerLoadStatus, MapLayerState } from '../modules/state/MapLayer.js'; +import Utils from './Utils.js'; +import ImageWMS from 'ol/source/ImageWMS.js'; +import {Image as ImageLayer} from 'ol/layer.js'; +import { BaseLayerState } from './state/BaseLayer.js'; +import { ValidationError } from './Errors.js'; + +/** + * Class for manage the load/display selected layers as a single OpenLayers ImageWMS layer + * @class + */ +export default class SingleWMSLayer { + /** + * Initialize the ImageWMS layer + * @param {map} mainMapInstance the main map instance + */ + //constructor(singleWMSLayerList) { + constructor(mainMapInstance) { + if (!mainLizmap.initialConfig.singleWMSLayer || !mainMapInstance || !(mainMapInstance instanceof map) || mainMapInstance.statesSingleWMSLayers.size == 0) { + throw new ValidationError('The Configuration is not valid, could not load the map as single WMS Layer'); + } + /** + * all the layers that should be inluded in the single ImageWMS. Contains layers names with their states sorted by layerOrder (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) + * @type {Map} + */ + this._singleWMSLayerList = mainMapInstance.statesSingleWMSLayers; + + /** + * list of base layers names + * @type {String[]} + */ + this._baseLayers = []; + + /** + * list of all map layers names + * @type {String[]} + */ + this._mapLayers = []; + + /** + * list of layers names on the current single layer displayed on map + * @type {String[]} + */ + this._layersName = []; + /** + * list of layers wms names on the current single layer displayed on map + * @type {String[]} + */ + this._layersWmsName = []; + + /** + * list of layers styles on the current single layer displayed on map + * @type {String[]} + */ + this._layerStyles = []; + + /** + * list of selection token parameter on the current single layer displayed on map + * @type {String[]} + */ + this._selectionTokens = []; + + /** + * list of filter token parameter on the current single layer displayed on map + * @type {String[]} + */ + this._filterTokens = []; + + /** + * list of legendOn parameter on the current single layer displayed on map + * @type {String[]} + */ + this._legendOn = []; + + /** + * list of legendOff parameter on the current single layer displayed on map + * @type {String[]} + */ + this._legendOff = []; + + /** + * the single WMS layer instance + * @type {?ImageLayer} + */ + this._layer = null; + + /** + * timeout function to manage the image layer reload + * @type {?function} + */ + this._timeout = null + + /** + * the WMS Ratio. + * @type {number} + */ + this._WMSRatio = 1.1; + + /** + * the image format + * @type {string} + * @todo could the format be readed from project config too? + */ + this._format = "image/png"; + + /** + * minimun map scale + * @type {number} + */ + this._minScale = 1; + + /** + * maximum map scale + * @type {number} + */ + this._maxScale = 1000000000000; + + /** + * meters per units + * @type {number} + */ + this._metersPerUnit = mainMapInstance.getView().getProjection().getMetersPerUnit(); + + /** + * ordered layers + * @type {String[]} + */ + this._orderedLayers = []; + + // construct base and map layers array + this._singleWMSLayerList.forEach((m,k) => { + if (m instanceof BaseLayerState) { + this._baseLayers.push(k); + } else if (m instanceof MapLayerState){ + this._mapLayers.push(k); + } + }); + + this._orderedLayers = this._baseLayers.concat(this._mapLayers); + // initialize single Image layer + this.initializeLayer(); + + // register listener for map layers + mainLizmap.state.rootMapGroup.addListener( + evt => { + if (this._mapLayers.includes(evt.name)) { + // the laeyr is included in the single WMS request + + // wait a bit in order to reduce the amount of requests + // e.g. when user turn on/off layers quickly + clearTimeout(this._timeout); + this._timeout = setTimeout(()=>{ + this.updateMap(); + },600) + } + }, + ['layer.visibility.changed','group.visibility.changed','layer.symbol.checked.changed', 'layer.style.changed', 'layer.selection.token.changed', 'layer.filter.token.changed'] + ); + + // register listener for base layers + mainLizmap.state.baseLayers.addListener( + evt => { + this.updateMap(); + }, + ['baselayers.selection.changed'] + ); + + } + /** + * @type {ImageLayer} + * + */ + get layer(){ + return this._layer; + } + /** + * creates the layer instance and get the startup single image + * @memberof SingleWMSLayer + */ + initializeLayer(){ + let minResolution = Utils.getResolutionFromScale(this._minScale, this._metersPerUnit); + let maxResolution = Utils.getResolutionFromScale(this._maxScale, this._metersPerUnit); + + this._layer = new ImageLayer({ + minResolution: minResolution, + maxResolution: maxResolution, + source: new ImageWMS({ + url: mainLizmap.serviceURL, + serverType: 'qgis', + ratio: this._WMSRatio, + params: { + LAYERS: null, + FORMAT: this._format, + STYLES: null, + DPI: 96 + } + }) + }); + + this._layer.setVisible(false); + + this._layer.setProperties({ + name: "singleWMSLayer" + }); + + // put the layer on top of the base layers + this._layer.setZIndex(0); + + // manage the spinners + this._layer.getSource().on('imageloadstart', event => { + for (const name of this._layersName) { + //add spinners on visible layers + const mapLayer = mainLizmap.state.rootMapGroup.getMapLayerByName(name); + mapLayer.loadStatus = MapLayerLoadStatus.Loading; + } + + }); + this._layer.getSource().on('imageloadend', event => { + //remove spinners + for (const name of this._mapLayers) { + const mapLayer = mainLizmap.state.rootMapGroup.getMapLayerByName(name); + mapLayer.loadStatus = MapLayerLoadStatus.Ready; + } + }); + + this._layer.getSource().on('imageloaderror', event => { + for (const name of this._mapLayers) { + const mapLayer = mainLizmap.state.rootMapGroup.getMapLayerByName(name); + mapLayer.loadStatus = MapLayerLoadStatus.Error; + } + }); + + // get the first image to display + this.updateMap(); + } + + /** + * update layer content + * @memberof SingleWMSLayer + */ + updateMap(){ + + this.prepareWMSParams() + + const wmsParams = this._layer.getSource().getParams(); + let param = { + LAYERS: this._layersWmsName.join(","), + FORMAT: this._format, + STYLES: this._layerStyles.join(","), + DPI: 96 + } + if (this._selectionTokens.join("").split("").length > 0) + param["SELECTIONTOKEN"] = this._selectionTokens.join(";"); + if (this._filterTokens.join("").split("").length > 0) + param["FILTERTOKEN"] = this._filterTokens.join(";"); + if (this._legendOn.join("").split("").length > 0) + param["LEGEND_ON"] = this._legendOn.join(";"); + if (this._legendOff.join("").split("").length > 0) + param["LEGEND_OFF"] = this._legendOff.join(";"); + + // updateParams merges the object, need to manually remove object keys + // that aren't in the current param object + for (const key of Object.keys(wmsParams)) { + if(!Object.hasOwn(param, key)){ + delete wmsParams[key]; + } + } + Object.assign(wmsParams, param); + + // update the map + if (this._layersWmsName.length == 0) { + // don't want to perform WMS request if the layer list is empty + this._layer.setVisible(false) + } else { + this._layer.getSource().updateParams(wmsParams); + this._layer.setVisible(true) + } + } + /** + * update class properties to construct the wms parameters used to get the single image + * + * @memberof SingleWMSLayer + */ + prepareWMSParams(){ + + const baseLayersState = mainLizmap.state.baseLayers; + this._layersName = []; + this._layersWmsName = []; + this._layerStyles = []; + this._selectionTokens =[]; + this._filterTokens = []; + this._legendOn = []; + this._legendOff = []; + + this._orderedLayers.forEach((layerName) => { + //since _orderedLayers property respect the layerOrder, if there is a baselayer in the list, then it will be put + //at the bottom of the image + const currentLayerState = this._singleWMSLayerList.get(layerName); + // detect baseLayer, if any + if (currentLayerState instanceof BaseLayerState) { + if(this._baseLayers.includes(baseLayersState.selectedBaseLayerName)){ + // get item state + const selectedBaseLayerState = baseLayersState.selectedBaseLayer.itemState; + this._layersWmsName.push(selectedBaseLayerState.wmsName); + this._layerStyles.push(selectedBaseLayerState.wmsSelectedStyleName || ""); + } + } else if (currentLayerState instanceof MapLayerState){ + // get item visibility + if(currentLayerState.visibility) { + this._layersName.push(currentLayerState.name); + this._layersWmsName.push(currentLayerState.wmsName); + this._layerStyles.push(currentLayerState.wmsSelectedStyleName || ""); + const wmsParam = currentLayerState.wmsParameters; + if (wmsParam){ + if(wmsParam.SELECTIONTOKEN) + this._selectionTokens.push(wmsParam.SELECTIONTOKEN); + if(wmsParam.FILTERTOKEN) + this._filterTokens.push(wmsParam.FILTERTOKEN); + if(wmsParam.LEGEND_ON) + this._legendOn.push(wmsParam.LEGEND_ON); + if(wmsParam.LEGEND_OFF) + this._legendOff.push(wmsParam.LEGEND_OFF); + } + } + } + }) + } + +} diff --git a/assets/src/modules/map.js b/assets/src/modules/map.js index df44f1e4af..a5df9ca568 100644 --- a/assets/src/modules/map.js +++ b/assets/src/modules/map.js @@ -34,6 +34,7 @@ import DoubleClickZoom from 'ol/interaction/DoubleClickZoom.js'; import DragZoom from 'ol/interaction/DragZoom.js'; import { defaults as defaultInteractions } from 'ol/interaction.js'; import { always } from 'ol/events/condition.js'; +import SingleWMSLayer from './SingleWMSLayer.js'; /** * Class initializing Openlayers Map. @@ -135,12 +136,12 @@ export default class map extends olMap { // Get pixel ratio, if High DPI is disabled do not use device pixel ratio const pixelRatio = this._hidpi ? this.pixelRatio_ : 1; - const useTileWms = this.getSize().reduce( + this._useTileWms = this.getSize().reduce( (r /*accumulator*/, x /*currentValue*/, i /*currentIndex*/) => r || Math.ceil(x*this._WMSRatio*pixelRatio) > wmsMaxSize[i], false, ); - const customTileGrid = useTileWms ? new TileGrid({ + this._customTileGrid = this._useTileWms ? new TileGrid({ extent: mainLizmap.lizmap3.map.restrictedExtent.toArray(), resolutions: resolutions, tileSize: this.getSize().map((x, i) => { @@ -165,6 +166,8 @@ export default class map extends olMap { // Array of layers and groups in overlayLayerGroup this._overlayLayersAndGroups = []; + // Mapping between layers name and states used to construct the singleWMSLayer, if needed + this._statesSingleWMSLayers = new Map(); const layersCount = mainLizmap.state.rootMapGroup.countExplodedMapLayers(); @@ -177,7 +180,10 @@ export default class map extends olMap { if(node.type !== 'layer' && node.type !== 'group'){ continue; } - layers.push(createNode(layer, statesOlLayersandGroupsMap, overlayLayersAndGroups, metersPerUnit, WMSRatio)); + let newNode = createNode(layer, statesOlLayersandGroupsMap, overlayLayersAndGroups, metersPerUnit, WMSRatio) + if(newNode){ + layers.push(newNode); + } } const layerGroup = new LayerGroup({ layers: layers @@ -200,7 +206,6 @@ export default class map extends olMap { if(node.type !== 'layer'){ return; } - /* Sometimes throw an Error and extent is not used let extent = node.layerConfig.extent; if(node.layerConfig.crs !== "" && node.layerConfig.crs !== mainLizmap.projection){ @@ -236,84 +241,89 @@ export default class map extends olMap { source: new WMTS(options) }); } - } - - // The layer has not been yet build - if (!layer) { - layer = new ImageLayer({ - // extent: extent, - minResolution: minResolution, - maxResolution: maxResolution, - source: new ImageWMS({ - url: mainLizmap.serviceURL, - serverType: 'qgis', - ratio: WMSRatio, - hidpi: this._hidpi, - params: { - LAYERS: node.wmsName, - FORMAT: node.layerConfig.imageFormat, - STYLES: node.wmsSelectedStyleName, - DPI: 96 - }, - }) - }); - - // Force no cache w/ Firefox - if(navigator.userAgent.includes("Firefox")){ - layer.getSource().setImageLoadFunction((image, src) => { - (image.getImage()).src = src + '&ts=' + Date.now(); - }); - } - - if (useTileWms) { - layer = new TileLayer({ - // extent: extent, - minResolution: minResolution, - maxResolution: maxResolution, - source: new TileWMS({ - url: mainLizmap.serviceURL, - serverType: 'qgis', - tileGrid: customTileGrid, - params: { - LAYERS: node.wmsName, - FORMAT: node.layerConfig.imageFormat, - STYLES: node.wmsSelectedStyleName, - DPI: 96, - TILED: 'true' - }, - wrapX: false, // do not reused across the 180° meridian. - hidpi: this._hidpi, // pixelRatio is used in useTileWms and customTileGrid definition - }) - }); - - // Force no cache w/ Firefox - if(navigator.userAgent.includes("Firefox")){ - layer.getSource().setTileLoadFunction((image, src) => { - (image.getImage()).src = src + '&ts=' + Date.now(); + } else { + if(mainLizmap.initialConfig.singleWMSLayer){ + this._statesSingleWMSLayers.set(node.name,node); + node.singleWMSLayer = true; + return + } else { + if (this._useTileWms) { + layer = new TileLayer({ + // extent: extent, + minResolution: minResolution, + maxResolution: maxResolution, + source: new TileWMS({ + url: mainLizmap.serviceURL, + serverType: 'qgis', + tileGrid: this._customTileGrid, + params: { + LAYERS: node.wmsName, + FORMAT: node.layerConfig.imageFormat, + STYLES: node.wmsSelectedStyleName, + DPI: 96, + TILED: 'true' + }, + wrapX: false, // do not reused across the 180° meridian. + hidpi: this._hidpi, // pixelRatio is used in useTileWms and customTileGrid definition + }) }); - } - } + // Force no cache w/ Firefox + if(navigator.userAgent.includes("Firefox")){ + layer.getSource().setTileLoadFunction((image, src) => { + (image.getImage()).src = src + '&ts=' + Date.now(); + }); + } + } else { + layer = new ImageLayer({ + // extent: extent, + minResolution: minResolution, + maxResolution: maxResolution, + source: new ImageWMS({ + url: mainLizmap.serviceURL, + serverType: 'qgis', + ratio: WMSRatio, + hidpi: this._hidpi, + params: { + LAYERS: node.wmsName, + FORMAT: node.layerConfig.imageFormat, + STYLES: node.wmsSelectedStyleName, + DPI: 96 + }, + }) + }); + + // Force no cache w/ Firefox + if(navigator.userAgent.includes("Firefox")){ + layer.getSource().setImageLoadFunction((image, src) => { + (image.getImage()).src = src + '&ts=' + Date.now(); + }); + } + } + } } - layer.setVisible(node.visibility); + if(layer){ + layer.setVisible(node.visibility); - layer.setOpacity(node.opacity); - - layer.setProperties({ - name: node.name - }); - - layer.getSource().setProperties({ - name: node.name - }); - - // OL layers zIndex is the reverse of layer's order given by cfg - layer.setZIndex(layersCount - 1 - node.layerOrder); + layer.setOpacity(node.opacity); + + layer.setProperties({ + name: node.name + }); + + layer.getSource().setProperties({ + name: node.name + }); + + // OL layers zIndex is the reverse of layer's order given by cfg + layer.setZIndex(layersCount - 1 - node.layerOrder); + + overlayLayersAndGroups.push(layer); + statesOlLayersandGroupsMap.set(node.name, [node, layer]); + return layer; + } - overlayLayersAndGroups.push(layer); - statesOlLayersandGroupsMap.set(node.name, [node, layer]); - return layer; } } @@ -398,7 +408,6 @@ export default class map extends olMap { if (layerMinResolution === undefined || layerMinResolution < resolutions[resolutions.length-1]) { layerMinResolution = resolutions[resolutions.length-1]; } - const tileGrid = new WMTSTileGrid({ origin: [-20037508, 20037508], resolutions: resolutions, @@ -451,43 +460,49 @@ export default class map extends olMap { source: new WMTS(options) }); } else { - baseLayer = new ImageLayer({ - // extent: extent, - minResolution: layerMinResolution, - maxResolution: layerMaxResolution, - source: new ImageWMS({ - url: mainLizmap.serviceURL, - projection: qgisProjectProjection, - serverType: 'qgis', - ratio: this._WMSRatio, - hidpi: this._hidpi, - params: { - LAYERS: baseLayerState.itemState.wmsName, - FORMAT: baseLayerState.layerConfig.imageFormat, - DPI: 96 - }, - }) - }); - if (useTileWms) { - baseLayer = new TileLayer({ - // extent: extent, - minResolution: layerMinResolution, - maxResolution: layerMaxResolution, - source: new TileWMS({ - url: mainLizmap.serviceURL, - projection: qgisProjectProjection, - serverType: 'qgis', - tileGrid: customTileGrid, - params: { - LAYERS: baseLayerState.itemState.wmsName, - FORMAT: baseLayerState.layerConfig.imageFormat, - DPI: 96, - TILED: 'true' - }, - wrapX: false, // do not reused across the 180° meridian. - hidpi: this._hidpi, // pixelRatio is used in useTileWms and customTileGrid definition - }) - }); + if(mainLizmap.initialConfig.singleWMSLayer){ + baseLayerState.singleWMSLayer = true; + this._statesSingleWMSLayers.set(baseLayerState.name, baseLayerState); + } else { + if (this._useTileWms) { + baseLayer = new TileLayer({ + // extent: extent, + minResolution: layerMinResolution, + maxResolution: layerMaxResolution, + source: new TileWMS({ + url: mainLizmap.serviceURL, + projection: qgisProjectProjection, + serverType: 'qgis', + tileGrid: this._customTileGrid, + params: { + LAYERS: baseLayerState.itemState.wmsName, + FORMAT: baseLayerState.layerConfig.imageFormat, + DPI: 96, + TILED: 'true' + }, + wrapX: false, // do not reused across the 180° meridian. + hidpi: this._hidpi, // pixelRatio is used in useTileWms and customTileGrid definition + }) + }); + } else { + baseLayer = new ImageLayer({ + // extent: extent, + minResolution: layerMinResolution, + maxResolution: layerMaxResolution, + source: new ImageWMS({ + url: mainLizmap.serviceURL, + projection: qgisProjectProjection, + serverType: 'qgis', + ratio: this._WMSRatio, + hidpi: this._hidpi, + params: { + LAYERS: baseLayerState.itemState.wmsName, + FORMAT: baseLayerState.layerConfig.imageFormat, + DPI: 96 + }, + }) + }); + } } } } else if (baseLayerState.type === BaseLayerTypes.Empty) { @@ -538,9 +553,21 @@ export default class map extends olMap { this._baseLayersGroup = new LayerGroup(); } + this._singleImageWmsGroup = new LayerGroup(); + + if (this._statesSingleWMSLayers.size > 0) { + //create new Image layer and add it to the map + const singleWMSLayer = new SingleWMSLayer(this); + + // create a new group + this._singleImageWmsGroup = new LayerGroup({ + layers:[singleWMSLayer.layer] + }); + } + // Add base and overlay layers to the map's main LayerGroup this.setLayerGroup(new LayerGroup({ - layers: [this._baseLayersGroup, this._overlayLayersGroup] + layers: [this._baseLayersGroup, this._singleImageWmsGroup, this._overlayLayersGroup] })); // Sync new OL view with OL2 view @@ -620,7 +647,7 @@ export default class map extends olMap { if (activeBaseLayer && activeBaseLayer.get("name") === evt.name) { activeBaseLayer.setOpacity(evt.opacity); } else { - this.getLayerOrGroupByName(evt.name).setOpacity(evt.opacity); + this.getLayerOrGroupByName(evt.name)?.setOpacity(evt.opacity); } }, ['layer.opacity.changed', 'group.opacity.changed'] @@ -628,7 +655,9 @@ export default class map extends olMap { mainLizmap.state.rootMapGroup.addListener( evt => { - const [state, olLayer] = this._statesOlLayersandGroupsMap.get(evt.name); + const stateOlLayerAndMap = this._statesOlLayersandGroupsMap.get(evt.name); + if (!stateOlLayerAndMap) return; + const [state, olLayer] = stateOlLayerAndMap; const wmsParams = olLayer.getSource().getParams(); // Delete entries in `wmsParams` not in `state.wmsParameters` @@ -720,6 +749,21 @@ export default class map extends olMap { return this._overlayLayersGroup; } + get statesSingleWMSLayers(){ + return this._statesSingleWMSLayers; + } + + get useTileWms(){ + return this._useTileWms; + } + + get customTileGrid(){ + return this._customTileGrid; + } + + get hidpi(){ + return this._hidpi; + } /** * Add highlight features on top of all layer * @param {string} features features as GeoJSON or WKT diff --git a/assets/src/modules/state/BaseLayer.js b/assets/src/modules/state/BaseLayer.js index ba07cc777b..006f4a43d4 100644 --- a/assets/src/modules/state/BaseLayer.js +++ b/assets/src/modules/state/BaseLayer.js @@ -31,6 +31,21 @@ export class BaseLayerState extends EventDispatcher { this._baseLayerConfig = baseLayerCfg; this._itemState = itemState; this._loadStatus = MapLayerLoadStatus.Undefined; + this._singleWMSLayer = false; + } + + /** + * set if the base layer is loaded in a single layer ImageLayer or not + * @param {boolean} val + */ + set singleWMSLayer(val){ + this._singleWMSLayer = val; + } + /** + * @type {boolean} + */ + get singleWMSLayer(){ + return this._singleWMSLayer; } /** diff --git a/assets/src/modules/state/LayerTree.js b/assets/src/modules/state/LayerTree.js index d3ef88795d..65a20e78eb 100644 --- a/assets/src/modules/state/LayerTree.js +++ b/assets/src/modules/state/LayerTree.js @@ -431,6 +431,15 @@ export class LayerTreeLayerState extends LayerTreeItemState { this._icon = getDefaultLayerIcon(this.layerConfig); } + /** + * vector layer is loaded in a single layer ImageLayer or not + * @type {boolean} + */ + get singleWMSLayer(){ + return this._mapItemState.singleWMSLayer; + } + + /** * Vector layer has selected features * The selected features is not empty diff --git a/assets/src/modules/state/MapLayer.js b/assets/src/modules/state/MapLayer.js index 810e30b459..9907330e11 100644 --- a/assets/src/modules/state/MapLayer.js +++ b/assets/src/modules/state/MapLayer.js @@ -518,11 +518,29 @@ export class MapLayerState extends MapItemState { this.itemState.addListener(this.dispatch.bind(this), 'layer.filter.changed'); this.itemState.addListener(this.dispatch.bind(this), 'layer.filter.token.changed'); } + // load the layer in a single ImageWMS layer + this._singleWMSLayer = false; // set isLoading to false this._loading = false; this._loadStatus = MapLayerLoadStatus.Undefined; } + /** + * set if the map layer is loaded in a single ImageWMS layer or not + * @param {boolean} val + */ + set singleWMSLayer(val){ + this._singleWMSLayer = val; + } + + /** + * vector layer is loaded in a single layer ImageLayer or not + * @type {boolean} + */ + get singleWMSLayer(){ + return this._singleWMSLayer; + } + /** * Layer type * @type {string} diff --git a/tests/qgis-projects/tests/single_wms_image.qgs b/tests/qgis-projects/tests/single_wms_image.qgs new file mode 100644 index 0000000000..2d06457e44 --- /dev/null +++ b/tests/qgis-projects/tests/single_wms_image.qgs @@ -0,0 +1,4760 @@ + + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +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 + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenStreetMap_029bc838_ea58_43c9_a5b6_cd7db7376d62 + single_wms_lines_1e302878_563d_4cc7_9bed_145269e95d68 + single_wms_points_7462146f_833e_4d7f_be4f_bccfc4ca1662 + single_wms_polygons_40d5f3fb_38b4_4012_9771_4a1f984eadf4 + single_wms_lines_group_83aee53e_4c30_43e8_afad_19b5c995dbd8 + single_wms_points_group_37aa76b0_0d6a_4b8c_8692_976350b1581b + single_wms_lines_group_as_layer_3b2aea6c_f225_4840_9065_832910fd65ea + single_wms_polygons_group_as_layer_cb8ca18b_9474_411f_9e56_3e2cf877ab58 + single_wms_baselayer_cbae5bbf_e9ca_49e9_ab6b_59d321e98aa9 + + + + + + + + + + + + + + + + + + meters + + 430224.52479840919841081 + 5395141.91507946606725454 + 439975.85128684353549033 + 5417079.09058097656816244 + + 0 + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +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 + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Annotations_c6664103_04b9_4abb_9927_30c878bca869 + + + + + Annotations + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +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 + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + + -20037508.34278924390673637 + -20037508.34278924763202667 + 20037508.34278924390673637 + 20037508.34278924763202667 + + + -180 + -85.05112877980660357 + 179.99999999999997158 + 85.05112877980660357 + + OpenStreetMap_029bc838_ea58_43c9_a5b6_cd7db7376d62 + crs=EPSG:3857&format&type=xyz&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0&http-header:referer= + OpenStreetMap + + + + OpenStreetMap + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +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 + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + OpenStreetMap tiles + + + dataset + OpenStreetMap tiles + OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world. + + + + + Base map and data from OpenStreetMap and OpenStreetMap Foundation (CC-BY-SA). © https://www.openstreetmap.org and contributors. + Open Data Commons Open Database License (ODbL) + Creative Commons Attribution-ShareAlike (CC-BY-SA) + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +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 + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + wms + + + + + + + + + 1 + 1 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + WholeRaster + Estimated + 0.02 + 0.98 + 2 + + + + + + resamplingFilter + + 0 + + + + 3.80298443326216784 + 43.56410038340207791 + 3.98200827168477911 + 43.65704581870000567 + + + 3.80298443326216784 + 43.56410038340207791 + 3.98200827168477911 + 43.65704581870000567 + + single_wms_baselayer_cbae5bbf_e9ca_49e9_ab6b_59d321e98aa9 + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=Polygon checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_baselayer" (geom) + single_wms_baselayer + + + + single_wms_baselayer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.81269890511455989 + 43.56401658401840393 + 3.91400696871805209 + 43.627503071758575 + + + 3.81269890511455989 + 43.56401658401840393 + 3.91400696871805209 + 43.627503071758575 + + single_wms_lines_1e302878_563d_4cc7_9bed_145269e95d68 + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=LineString checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_lines" (geom) + single_wms_lines + Lines + + + + single_wms_lines + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.88174104435118705 + 43.62005232408321831 + 3.89376848569223988 + 43.62909356120091076 + + + 3.88174104435118705 + 43.62005232408321831 + 3.89376848569223988 + 43.62909356120091076 + + single_wms_lines_group_83aee53e_4c30_43e8_afad_19b5c995dbd8 + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=LineString checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_lines_group" (geom) + single_wms_lines_group + + + + single_wms_lines_group + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.89746923687410218 + 43.62457311261664472 + 3.91828596227208203 + 43.63629209230957429 + + + 3.89746923687410218 + 43.62457311261664472 + 3.91828596227208203 + 43.63629209230957429 + + single_wms_lines_group_as_layer_3b2aea6c_f225_4840_9065_832910fd65ea + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=LineString checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_lines_group_as_layer" (geom) + single_wms_lines_group_as_layer + + + + single_wms_lines_group_as_layer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.85664532539917992 + 43.57105532588823138 + 3.95402134087194401 + 43.62298250356227669 + + + 3.85664532539917992 + 43.57105532588823138 + 3.95402134087194401 + 43.62298250356227669 + + single_wms_points_7462146f_833e_4d7f_be4f_bccfc4ca1662 + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=Point checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_points" (geom) + single_wms_points + Points + + + + single_wms_points + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + 0 + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.88567309248191517 + 43.6228987861304347 + 3.88983643756151087 + 43.62557768612489895 + + + 3.88567309248191517 + 43.6228987861304347 + 3.88983643756151087 + 43.62557768612489895 + + single_wms_points_group_37aa76b0_0d6a_4b8c_8692_976350b1581b + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=Point checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_points_group" (geom) + single_wms_points_group + + + + single_wms_points_group + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.839991945080798 + 43.57356896293617865 + 3.93644277275809706 + 43.63754756174982674 + + + 3.839991945080798 + 43.57356896293617865 + 3.93644277275809706 + 43.63754756174982674 + + single_wms_polygons_40d5f3fb_38b4_4012_9771_4a1f984eadf4 + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=Polygon checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_polygons" (geom) + single_wms_polygons + Polygons + + + + single_wms_polygons + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "title" + + + + + 3.88960514061264506 + 43.62725193799943213 + 3.93493934259046396 + 43.64164857911855222 + + + 3.88960514061264506 + 43.62725193799943213 + 3.93493934259046396 + 43.64164857911855222 + + single_wms_polygons_group_as_layer_cb8ca18b_9474_411f_9e56_3e2cf877ab58 + service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=Polygon checkPrimaryKeyUnicity='1' table="tests_projects"."single_wms_polygons_group_as_layer" (geom) + single_wms_polygons_group_as_layer + + + + single_wms_polygons_group_as_layer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + EPSG:7030 + + + m2 + meters + + + 5 + 2.5 + false + false + 1 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + + false + + 1 + + + + lizmap_repository + lizmap_user + lizmap_user_groups + + + intranet + + + + + + + + single_wms_baselayer_cbae5bbf_e9ca_49e9_ab6b_59d321e98aa9 + single_wms_lines_1e302878_563d_4cc7_9bed_145269e95d68 + single_wms_lines_group_83aee53e_4c30_43e8_afad_19b5c995dbd8 + single_wms_lines_group_as_layer_3b2aea6c_f225_4840_9065_832910fd65ea + single_wms_points_7462146f_833e_4d7f_be4f_bccfc4ca1662 + single_wms_points_group_37aa76b0_0d6a_4b8c_8692_976350b1581b + single_wms_polygons_40d5f3fb_38b4_4012_9771_4a1f984eadf4 + single_wms_polygons_group_as_layer_cb8ca18b_9474_411f_9e56_3e2cf877ab58 + + + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + + + + + + + + None + false + + + + + + + EPSG:4326 + EPSG:3857 + + 1 + + 414463.27939999999944121 + 5394742.82330000028014183 + 452853.33649999997578561 + 5416679.9988000001758337 + + false + conditions unknown + 90 + + + + 1 + + 8 + single_wms_image + false + + true + single_wms_image + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + riccardo + 2023-10-30T14:10:42 + + + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +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 + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + diff --git a/tests/qgis-projects/tests/single_wms_image.qgs.cfg b/tests/qgis-projects/tests/single_wms_image.qgs.cfg new file mode 100644 index 0000000000..959ca4a68b --- /dev/null +++ b/tests/qgis-projects/tests/single_wms_image.qgs.cfg @@ -0,0 +1,571 @@ +{ + "metadata": { + "qgis_desktop_version": 32807, + "lizmap_plugin_version_str": "4.0.1", + "lizmap_plugin_version": 40001, + "lizmap_web_client_target_version": 30800, + "lizmap_web_client_target_status": "Dev", + "instance_target_url": "http://localhost:8130/", + "instance_target_repository": "intranet" + }, + "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": [ + "414463.27939999999944121", + "5394742.82330000028014183", + "452853.33649999997578561", + "5416679.9988000001758337" + ], + "mapScales": [ + 10000, + 25000, + 50000, + 100000, + 250000, + 500000 + ], + "minScale": 1, + "maxScale": 1000000000, + "initialExtent": [ + 414463.2794, + 5394742.8233, + 452853.3365, + 5416679.9988 + ], + "popupLocation": "dock", + "draw": "True", + "measure": "True", + "zoomHistory": "True", + "pointTolerance": 25, + "lineTolerance": 10, + "polygonTolerance": 5, + "tmTimeFrameSize": 10, + "tmTimeFrameType": "seconds", + "tmAnimationFrameLength": 1000, + "datavizLocation": "dock", + "theme": "dark", + "fixed_scale_overview_map": true, + "dataviz_drag_drop": [] + }, + "layers": { + "GroupAsLayer": { + "id": "GroupAsLayer", + "name": "GroupAsLayer", + "type": "layer", + "title": "GroupAsLayer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "True", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_lines_group_as_layer": { + "id": "single_wms_lines_group_as_layer_3b2aea6c_f225_4840_9065_832910fd65ea", + "name": "single_wms_lines_group_as_layer", + "type": "layer", + "geometryType": "line", + "extent": [ + 3.897469236874102, + 43.624573112616645, + 3.918285962272082, + 43.636292092309574 + ], + "crs": "EPSG:4326", + "title": "single_wms_lines_group_as_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_polygons_group_as_layer": { + "id": "single_wms_polygons_group_as_layer_cb8ca18b_9474_411f_9e56_3e2cf877ab58", + "name": "single_wms_polygons_group_as_layer", + "type": "layer", + "geometryType": "polygon", + "extent": [ + 3.889605140612645, + 43.62725193799943, + 3.934939342590464, + 43.64164857911855 + ], + "crs": "EPSG:4326", + "title": "single_wms_polygons_group_as_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "Group_1": { + "id": "Group_1", + "name": "Group_1", + "type": "group", + "title": "Group_1", + "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", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_lines_group": { + "id": "single_wms_lines_group_83aee53e_4c30_43e8_afad_19b5c995dbd8", + "name": "single_wms_lines_group", + "type": "layer", + "geometryType": "line", + "extent": [ + 3.881741044351187, + 43.62005232408322, + 3.89376848569224, + 43.62909356120091 + ], + "crs": "EPSG:4326", + "title": "single_wms_lines_group", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_points_group": { + "id": "single_wms_points_group_37aa76b0_0d6a_4b8c_8692_976350b1581b", + "name": "single_wms_points_group", + "type": "layer", + "geometryType": "point", + "extent": [ + 3.885673092481915, + 43.622898786130435, + 3.889836437561511, + 43.6255776861249 + ], + "crs": "EPSG:4326", + "title": "single_wms_points_group", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_points": { + "id": "single_wms_points_7462146f_833e_4d7f_be4f_bccfc4ca1662", + "name": "single_wms_points", + "type": "layer", + "geometryType": "point", + "extent": [ + 3.85664532539918, + 43.57105532588823, + 3.954021340871944, + 43.62298250356228 + ], + "crs": "EPSG:4326", + "styles": [ + "default", + "white_dots" + ], + "title": "Points", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_lines": { + "id": "single_wms_lines_1e302878_563d_4cc7_9bed_145269e95d68", + "name": "single_wms_lines", + "type": "layer", + "geometryType": "line", + "extent": [ + 3.81269890511456, + 43.564016584018404, + 3.914006968718052, + 43.627503071758575 + ], + "crs": "EPSG:4326", + "title": "Lines", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_polygons": { + "id": "single_wms_polygons_40d5f3fb_38b4_4012_9771_4a1f984eadf4", + "name": "single_wms_polygons", + "type": "layer", + "geometryType": "polygon", + "extent": [ + 3.839991945080798, + 43.57356896293618, + 3.936442772758097, + 43.63754756174983 + ], + "crs": "EPSG:4326", + "title": "Polygons", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "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", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "single_wms_baselayer": { + "id": "single_wms_baselayer_cbae5bbf_e9ca_49e9_ab6b_59d321e98aa9", + "name": "single_wms_baselayer", + "type": "layer", + "geometryType": "polygon", + "extent": [ + 3.802984433262168, + 43.56410038340208, + 3.982008271684779, + 43.657045818700006 + ], + "crs": "EPSG:4326", + "title": "single_wms_baselayer", + "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", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "OpenStreetMap": { + "id": "OpenStreetMap_029bc838_ea58_43c9_a5b6_cd7db7376d62", + "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", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + } + }, + "atlas": { + "layers": [] + }, + "locateByLayer": {}, + "attributeLayers": { + "single_wms_lines": { + "layerId": "single_wms_lines_1e302878_563d_4cc7_9bed_145269e95d68", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 0 + }, + "single_wms_points": { + "layerId": "single_wms_points_7462146f_833e_4d7f_be4f_bccfc4ca1662", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 1 + }, + "single_wms_lines_group": { + "layerId": "single_wms_lines_group_83aee53e_4c30_43e8_afad_19b5c995dbd8", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 2 + }, + "single_wms_lines_group_as_layer": { + "layerId": "single_wms_lines_group_as_layer_3b2aea6c_f225_4840_9065_832910fd65ea", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 3 + }, + "single_wms_points_group": { + "layerId": "single_wms_points_group_37aa76b0_0d6a_4b8c_8692_976350b1581b", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 4 + }, + "single_wms_polygons": { + "layerId": "single_wms_polygons_40d5f3fb_38b4_4012_9771_4a1f984eadf4", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 5 + }, + "single_wms_polygons_group_as_layer": { + "layerId": "single_wms_polygons_group_as_layer_cb8ca18b_9474_411f_9e56_3e2cf877ab58", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 6 + } + }, + "tooltipLayers": {}, + "editionLayers": { + "single_wms_lines": { + "layerId": "single_wms_lines_1e302878_563d_4cc7_9bed_145269e95d68", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "True", + "deleteFeature": "True" + }, + "geometryType": "line", + "order": 0 + }, + "single_wms_points": { + "layerId": "single_wms_points_7462146f_833e_4d7f_be4f_bccfc4ca1662", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "True", + "deleteFeature": "True" + }, + "geometryType": "point", + "order": 1 + } + }, + "layouts": { + "config": { + "default_popup_print": false + }, + "list": [] + }, + "loginFilteredLayers": {}, + "timemanagerLayers": {}, + "datavizLayers": {}, + "filter_by_polygon": { + "config": { + "polygon_layer_id": "single_wms_polygons_40d5f3fb_38b4_4012_9771_4a1f984eadf4", + "group_field": "", + "filter_by_user": false + }, + "layers": [] + }, + "formFilterLayers": {} +} diff --git a/tests/qgis-projects/tests/tests_dataset.sql b/tests/qgis-projects/tests/tests_dataset.sql index cc63fba72b..825fd3655e 100644 --- a/tests/qgis-projects/tests/tests_dataset.sql +++ b/tests/qgis-projects/tests/tests_dataset.sql @@ -1685,6 +1685,86 @@ CREATE TABLE tests_projects.birds_areas ( + +-- +-- Name: single_wms_points; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_points ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(Point,4326) +); + + +-- +-- Name: single_wms_lines; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_lines ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(LineString,4326) +); + + +-- +-- Name: single_wms_lines; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_polygons ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(Polygon,4326) +); + + +-- +-- Name: single_wms_points_group; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_points_group ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(Point,4326) +); + + +-- +-- Name: single_wms_lines_group; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_lines_group ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(LineString,4326) +); + + +-- +-- Name: single_wms_lines_group_as_layer; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_lines_group_as_layer ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(LineString,4326) +); + + +-- +-- Name: single_wms_polygons_group_as_layer; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_polygons_group_as_layer ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(Polygon,4326) +); + +-- +-- Name: single_wms_baselayer; Type: Table; Schema: tests_projects; Owner: - +-- +CREATE TABLE tests_projects.single_wms_baselayer ( + id SERIAL PRIMARY KEY, + title text, + geom public.geometry(Polygon,4326) +); + + -- -- Name: tramway_stops_id_stop_seq; Type: SEQUENCE OWNED BY; Schema: tests_projects; Owner: - -- @@ -2480,6 +2560,92 @@ COPY tests_projects.parent_layer (id, geom) FROM stdin; \. +-- +-- Data for Name: single_wms_points; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_points ("title", geom) FROM stdin; +Point_1 0101000000D4E246DD68DA0E40F6FE852F6FCE4540 +Point_2 01010000009F4B2640BA2E0F40BC7596500ECF4540 +Point_3 010100000086E099F00A170F404BD17ACF65CC4540 +Point_4 01010000000FC4C44FC7EE0E404BD17ACF65CC4540 +Point_5 01010000005E67816DC7000F40DD6303E4BDCF4540 +Point_6 01010000003BD9D5F0D5A10F40C372465718C94540 +\. + + +-- +-- Data for Name: single_wms_lines; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_lines ("title", geom) FROM stdin; +Line_1 010200000003000000F9B211BC9ED60E408E3A65F50FCD4540540A8151ACE70E40CE34022A99CD4540959FB13B18FB0E408E3A65F50FCD4540 +Line_2 010200000003000000D834E225840E0F40D9FC65426DCD454033359F5F9F390F408A58458ECACD4540E7426E59180D0F40EA80A308B1CE4540 +Line_3 0102000000030000004DFF1B7EAC020F404E56A30FE0CA4540832F0ED991310F406B3AC4F516CB454059AEB7E2E24F0F40D560CC5F30CA4540 +Line_4 01020000000400000050B8E50891B30E40DBAB490552D0454043B2974868800E40FF555E11C5CD4540BACE6CE9ABA80E40EE7C290001CB4540DF96F95476D90E405E6107B231C84540 +\. + + +-- +-- Data for Name: single_wms_polygons; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_polygons ("title", geom) FROM stdin; +Polygon_1 01030000000100000005000000B4C30716ACC30E40483F48BDBFD04540DF96F95476D90E408FC7AF52D9CF4540353DDDD20A050F401952B198F6D0454072CFE65CE2FE0E4016AE93289BD14540B4C30716ACC30E40483F48BDBFD04540 +Polygon_2 0103000000010000000500000084D85B7D9F4B0F4016605975F6CD454091E6E7B0334A0F4093FE883C2FCF45409B925CB5D57D0F407B4B94215BCF454058FD2BCB696A0F4019537694BFCD454084D85B7D9F4B0F4016605975F6CD4540 +Polygon_3 01030000000100000006000000ECA485880AD80E404588118DE5CA4540FC5B5F60ACF00E40C7E5AC6425CA4540ADB8A242ACDE0E40E0E730B56AC94540233468B24DB80E40739AD9C084CB4540FE639DD317BC0E40EA2CE38FE7CB4540ECA485880AD80E404588118DE5CA4540 +\. + + +-- +-- Data for Name: single_wms_points_group; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_points_group ("title", geom) FROM stdin; +Gr_Point_1 01010000008E4139C6DB150F40C481FBED12D04540 +Gr_Point_2 01010000003CEDF090621E0F40FC92BD25BBCF4540 +\. + + +-- +-- Data for Name: single_wms_lines_group; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_lines_group ("title", geom) FROM stdin; +Gr_Line_1 010200000003000000ECF2811770260F40C0783E418FCF4540560909F88A1B0F40B5BD472386D04540D487F5C7C00E0F402B69E0A680D04540 +Gr_Line_2 010200000003000000DE3BA83FCE0D0F4090257F710DD04540A95D512D04130F40C0783E418FCF4540F7A6348F7D250F4084DFE2DF5DCF4540 +\. + + +-- +-- Data for Name: single_wms_lines_group_as_layer; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_lines_group_as_layer ("title", geom) FROM stdin; +GrL_Line_1 0102000000050000005C0C30581F350F40AE3AB89756D14540368BD96170530F402696EF0472D1454004AD824FA6580F40DA545E06B2D04540A0A160428B480F40B407A0CA49D0454075CE6E03C1320F40F8F619FFBCD04540 +GrL_Line_1 010200000003000000A152EC59042E0F40D13CCBCB09D1454094446026702F0F4020530203F2CF4540858548DB624B0F4023B1837FF7CF4540 +\. + + +-- +-- Data for Name: single_wms_polygons_group_as_layer; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_polygons_group_as_layer ("title", geom) FROM stdin; +GrL_Polygon_1 010300000001000000050000004047CA4CE91D0F407A324B0E1CD24540369317D5DB1E0F4095FB91B52AD145408736D4F2DB300F402472445BAED14540721DE3EB474D0F40666B678A21D245404047CA4CE91D0F407A324B0E1CD24540 +GrL_Polygon_2 01030000000100000005000000DDDCB770705C0F40B407A0CA49D04540C71A79C5CE5E0F408F1E65FD7CD145401B180F9F55700F4034D366C414D14540B75B617AC17A0F40B407A0CA49D04540DDDCB770705C0F40B407A0CA49D04540 +\. + + +-- +-- Data for Name: single_wms_baselayer; Type: TABLE DATA; Schema: tests_projects; Owner: - +-- + +COPY tests_projects.single_wms_baselayer ("title", geom) FROM stdin; +BaseLayer 010300000001000000050000000077401A836C0E406218402DF9D34540F368B4E6EE6D0E40BE2FFD7034C84540064D1A2727DB0F40E97A89E64FC845403177BEC1E3D60F4021A5CF131AD445400077401A836C0E406218402DF9D34540 +\. + + -- -- Data for Name: quartiers; Type: TABLE DATA; Schema: tests_projects; Owner: - -- From 27ad3555d5d495ab23dffcde9d7c4d919d973969 Mon Sep 17 00:00:00 2001 From: Riccardo Beltrami Date: Fri, 23 Feb 2024 11:36:41 +0100 Subject: [PATCH 2/6] read singleWMSLayer option from config --- assets/src/modules/Config.js | 19 +- .../qgis-projects/tests/single_wms_image.qgs | 1025 +++++++++-------- .../tests/single_wms_image.qgs.cfg | 17 +- 3 files changed, 522 insertions(+), 539 deletions(-) diff --git a/assets/src/modules/Config.js b/assets/src/modules/Config.js index 2c0885398a..397a0fbc20 100644 --- a/assets/src/modules/Config.js +++ b/assets/src/modules/Config.js @@ -95,10 +95,9 @@ export class Config { throw new ValidationError('No `' + prop + '` in the WMS Capabilities!'); } } - this._theConfig = theConfig; this._theWmsCapabilities = theWmsCapabilities; - this._singleWMSLayer = theConfig._singleWMSLayer; + this._singleWMSLayer = theConfig.options?.wms_single_request_for_all_layers == "True" ? true : false; const optionalConfigProperties = [ 'metadata', @@ -126,22 +125,6 @@ export class Config { || Object.getOwnPropertyNames(theConfig.datavizLayers.dataviz).length == 0)) { this._hasDatavizConfig = false; } - - /** - * FIXME - * only for testing purpose! - * - * this event allows the _singleWMSLayer property to be set from external custom js - * and should be removed after implementing the "singleWMSLayer option" on the QGIS lizMap plugin. - * This plugin option will allow to read the _singleWMSLayer property directly from qgs.cfg file - * - * NOTE: this lines cause js-units tests to fail (config and state tests) - */ - lizMap.events.on({ - setSingeWMSLayer: (ev)=>{ - this._singleWMSLayer = ev.singleWMSLayer - } - }) } /** diff --git a/tests/qgis-projects/tests/single_wms_image.qgs b/tests/qgis-projects/tests/single_wms_image.qgs index 2d06457e44..78ceb774d4 100644 --- a/tests/qgis-projects/tests/single_wms_image.qgs +++ b/tests/qgis-projects/tests/single_wms_image.qgs @@ -1,5 +1,5 @@ - + @@ -21,67 +21,67 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -99,16 +99,16 @@ single_wms_baselayer_cbae5bbf_e9ca_49e9_ab6b_59d321e98aa9 - + - - - - - - - - + + + + + + + + @@ -140,60 +140,60 @@ - - + + - + - - + + - + - + - + - + - - + + - + - + Annotations_c6664103_04b9_4abb_9927_30c878bca869 @@ -244,7 +244,7 @@ - + -20037508.34278924390673637 -20037508.34278924763202667 @@ -285,7 +285,7 @@ OpenStreetMap tiles OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world. - + Base map and data from OpenStreetMap and OpenStreetMap Foundation (CC-BY-SA). © https://www.openstreetmap.org and contributors. @@ -306,7 +306,7 @@ - + wms @@ -323,13 +323,13 @@ 0 0 - + - + - + - + - + - + - + 3.80298443326216784 43.56410038340207791 @@ -520,7 +520,7 @@ - + @@ -545,13 +545,13 @@ 1 0 - + - + - + - + - + - + - + - + - + - + - + - + 3.81269890511455989 43.56401658401840393 @@ -960,7 +961,7 @@ def my_form_open(dialog, layer, feature): - + @@ -985,13 +986,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + 3.88174104435118705 43.62005232408321831 @@ -1654,7 +1655,7 @@ def my_form_open(dialog, layer, feature): - + @@ -1679,13 +1680,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - + - + - + 3.89746923687410218 43.62457311261664472 @@ -2104,7 +2105,7 @@ def my_form_open(dialog, layer, feature): - + @@ -2129,13 +2130,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - + - + - + 3.85664532539917992 43.57105532588823138 @@ -2555,7 +2556,7 @@ def my_form_open(dialog, layer, feature): - + @@ -2572,188 +2573,188 @@ def my_form_open(dialog, layer, feature): - + 1 1 1 0 - + - + - + - + - + - + - + - + - + - + - + @@ -2764,7 +2765,7 @@ def my_form_open(dialog, layer, feature): @@ -2773,53 +2774,53 @@ def my_form_open(dialog, layer, feature): 0 1 - - - + + + - + - + @@ -2827,12 +2828,12 @@ def my_form_open(dialog, layer, feature): - + @@ -2859,30 +2860,30 @@ def my_form_open(dialog, layer, feature): - - + + - - + + - - + + - - + + - + - @@ -2914,12 +2915,12 @@ def my_form_open(dialog, layer, feature): 0 generatedlayout - - + + - - + + @@ -2941,13 +2942,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - + - @@ -3276,12 +3277,12 @@ def my_form_open(dialog, layer, feature): 0 generatedlayout - - + + - - + + @@ -3292,7 +3293,7 @@ def my_form_open(dialog, layer, feature): "title" - + 3.88567309248191517 43.6228987861304347 @@ -3358,7 +3359,7 @@ def my_form_open(dialog, layer, feature): - + @@ -3383,13 +3384,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - + - + - + 3.839991945080798 43.57356896293617865 @@ -3801,7 +3802,7 @@ def my_form_open(dialog, layer, feature): - + @@ -3826,13 +3827,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - + - + - + 3.88960514061264506 43.62725193799943213 @@ -4249,13 +4250,13 @@ def my_form_open(dialog, layer, feature): 1 0 - + - + - + - + - + - + - + - + - + - + - +