@geogirafe/lib-geoportal 1.3.0-dev.3018313151 → 1.3.0-dev.3046054236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import type { BaseCustomizer, MFPLayer, MFPMap, MFPWmtsLayer, MFPWmsLayer } from '@geoblocks/mapfishprint';
2
2
  import type BaseLayer from '../../../models/layers/baselayer.js';
3
- import GroupLayer from '../../../models/layers/grouplayer.js';
4
3
  import MapManager from '../../../tools/state/mapManager.js';
5
4
  import State from '../../../tools/state/state.js';
6
5
  import LayerLocalFile from '../../../models/layers/layerlocalfile.js';
7
6
  import LayerWms from '../../../models/layers/layerwms.js';
8
7
  import LayerWmts from '../../../models/layers/layerwmts.js';
8
+ import WmsClient from '../../../tools/wms/wmsclient.js';
9
9
  /** Options for encoding a map. */
10
10
  export interface EncodeMapOptions {
11
11
  state: State;
@@ -21,6 +21,8 @@ export interface EncodeMapOptions {
21
21
  export default class MFPEncoder {
22
22
  private printResolution;
23
23
  private options?;
24
+ private wmsClients;
25
+ private mapInternal;
24
26
  /**
25
27
  * Sets the options for encoding the map.
26
28
  */
@@ -30,6 +32,10 @@ export default class MFPEncoder {
30
32
  * @returns A Promise that resolves with the encoded map object.
31
33
  */
32
34
  encodeMap(options: EncodeMapOptions): MFPMap;
35
+ /**
36
+ * @returns an appropriate (existing or new) WMS client for the layer.
37
+ */
38
+ getWmsClient(layer: LayerWms): WmsClient;
33
39
  /**
34
40
  * @returns An array of all active layers from the state object in the right order
35
41
  */
@@ -38,6 +44,20 @@ export default class MFPEncoder {
38
44
  * @returns The flattened array of base layers.
39
45
  */
40
46
  getFlatLayers(baseLayers: BaseLayer[]): BaseLayer[];
47
+ /**
48
+ * See "getFlatLayers".
49
+ * Flatten the array of layer but without WMS layers (added to
50
+ * a WMS client and collected later).
51
+ * @returns The flattened array of base layers without WMS.
52
+ */
53
+ getFlatLayersCollect(baseLayers: BaseLayer[]): BaseLayer[];
54
+ /**
55
+ * See "getFlatLayers".
56
+ * Add the previously collected WMS layers to the list of layers.
57
+ * This is needed to "group" WMS Layers together.
58
+ * @returns The flattened array of WMS layers.
59
+ */
60
+ getFlatLayersAddWms(): BaseLayer[];
41
61
  /**
42
62
  * Encode special layers, meaning not-in-the-layer-tree layers.
43
63
  * These layers are from the mapManager.getLayersToPrint method.
@@ -54,15 +74,6 @@ export default class MFPEncoder {
54
74
  * @returns A promise that resolves to an array of MFP layers, a single MFP layer, or null.
55
75
  */
56
76
  encodeLayer(layer: BaseLayer): MFPLayer[] | MFPLayer | null;
57
- /**
58
- * Only non mixed groups of WMS layers are supported.
59
- *
60
- * Will convert a group of WMS layers sharing the same OGC server into a single MFPWmsLayer
61
- * where its 'layers' property is a concatenation of all child layers' 'layers' property.
62
- *
63
- * @param groupLayer
64
- */
65
- encodeGroupLayer(groupLayer: GroupLayer): MFPWmsLayer | null;
66
77
  /**
67
78
  * Encodes an image layer from a WMS layer object.
68
79
  * @returns The encoded image layer or null if the layer is not visible.
@@ -83,4 +94,5 @@ export default class MFPEncoder {
83
94
  * @returns The encoded WMS layer or null if the ogcServer is missing.
84
95
  */
85
96
  encodeWmsFromWmtsLayer(layerWmts: LayerWmts): MFPWmsLayer | null;
97
+ private clear;
86
98
  }
@@ -1,6 +1,6 @@
1
- import { getAbsoluteUrl, getWmtsMatrices, getWmtsUrl, MFPVectorEncoder } from '@geoblocks/mapfishprint';
2
- import GroupLayer from '../../../models/layers/grouplayer.js';
1
+ import OlMap from 'ol/Map.js';
3
2
  import { toDegrees } from 'ol/math.js';
3
+ import { getAbsoluteUrl, getWmtsMatrices, getWmtsUrl, MFPVectorEncoder } from '@geoblocks/mapfishprint';
4
4
  import LayerLocalFile from '../../../models/layers/layerlocalfile.js';
5
5
  import LayerWms from '../../../models/layers/layerwms.js';
6
6
  import LayerWmts from '../../../models/layers/layerwmts.js';
@@ -9,7 +9,7 @@ import { isLayerVisible } from './printUtils.js';
9
9
  import VectorSource from 'ol/source/Vector.js';
10
10
  import LayerWmtsExternal from '../../../models/layers/layerwmtsexternal.js';
11
11
  import LayerWmsExternal from '../../../models/layers/layerwmsexternal.js';
12
- import WmsClient from '../../../tools/wms/wmsclient.js';
12
+ import WmsClient, { WmsClientDefault } from '../../../tools/wms/wmsclient.js';
13
13
  /** Supported MapFishPRint servers
14
14
  * see https://github.com/mapfish/mapfish-print/blob/master/core/src/main/java/org/mapfish/print/map/image/wms/WmsLayerParam.java#L123
15
15
  */
@@ -20,6 +20,8 @@ const MFPSupportedServerType = new Set(['mapserver', 'geoserver', 'qgisserver'])
20
20
  export default class MFPEncoder {
21
21
  printResolution = 100;
22
22
  options;
23
+ wmsClients = null;
24
+ mapInternal = null;
23
25
  /**
24
26
  * Sets the options for encoding the map.
25
27
  */
@@ -31,6 +33,7 @@ export default class MFPEncoder {
31
33
  * @returns A Promise that resolves with the encoded map object.
32
34
  */
33
35
  encodeMap(options) {
36
+ this.clear();
34
37
  this.setOptions(options);
35
38
  const mapManager = options.mapManager;
36
39
  const view = mapManager.getMap().getView();
@@ -41,6 +44,7 @@ export default class MFPEncoder {
41
44
  const allLayers = this.getAllLayers(options.state);
42
45
  const mfpLayers = this.encodeLayers(allLayers);
43
46
  mfpLayers.unshift(...this.encodeSpecialLayers(mapManager, options.customizer));
47
+ this.clear();
44
48
  return {
45
49
  center,
46
50
  dpi: options.dpi,
@@ -51,6 +55,24 @@ export default class MFPEncoder {
51
55
  useNearestScale: false
52
56
  };
53
57
  }
58
+ /**
59
+ * @returns an appropriate (existing or new) WMS client for the layer.
60
+ */
61
+ getWmsClient(layer) {
62
+ if (!this.mapInternal || !this.wmsClients) {
63
+ this.mapInternal = new OlMap();
64
+ this.wmsClients = new Map();
65
+ }
66
+ let wmsClient = this.wmsClients.get(layer.ogcServer.name);
67
+ if (!wmsClient) {
68
+ wmsClient = new WmsClientDefault(layer.ogcServer, this.mapInternal, {
69
+ stateManager: { state: this.options?.state },
70
+ configManager: { Config: {} }
71
+ });
72
+ this.wmsClients.set(layer.ogcServer.name, wmsClient);
73
+ }
74
+ return wmsClient;
75
+ }
54
76
  /**
55
77
  * @returns An array of all active layers from the state object in the right order
56
78
  */
@@ -66,19 +88,27 @@ export default class MFPEncoder {
66
88
  * @returns The flattened array of base layers.
67
89
  */
68
90
  getFlatLayers(baseLayers) {
91
+ const flatLayers = this.getFlatLayersCollect(baseLayers);
92
+ flatLayers.push(...this.getFlatLayersAddWms());
93
+ return flatLayers;
94
+ }
95
+ /**
96
+ * See "getFlatLayers".
97
+ * Flatten the array of layer but without WMS layers (added to
98
+ * a WMS client and collected later).
99
+ * @returns The flattened array of base layers without WMS.
100
+ */
101
+ getFlatLayersCollect(baseLayers) {
69
102
  return baseLayers.reduce((layers, layer) => {
70
103
  const children = layer.children;
71
104
  if (children) {
72
- const group = layer;
73
- // If all the children have the same ogcServer and the group
74
- // has no grandchildren, we keep the layers together
75
- if (group.isMixed === false && group.hasGrandChildren === false) {
76
- layers.push(...group.children);
77
- }
78
- else {
79
- const resultLayers = this.getFlatLayers(group.children);
80
- layers.push(...resultLayers);
81
- }
105
+ // Flat layers recursively.
106
+ layers.push(...this.getFlatLayersCollect(children));
107
+ }
108
+ else if (layer instanceof LayerWms) {
109
+ // Use the WMS client to group layers.
110
+ const wmsClient = this.getWmsClient(layer);
111
+ wmsClient.addLayer(layer);
82
112
  }
83
113
  else {
84
114
  layers.push(layer);
@@ -86,6 +116,34 @@ export default class MFPEncoder {
86
116
  return layers;
87
117
  }, []);
88
118
  }
119
+ /**
120
+ * See "getFlatLayers".
121
+ * Add the previously collected WMS layers to the list of layers.
122
+ * This is needed to "group" WMS Layers together.
123
+ * @returns The flattened array of WMS layers.
124
+ */
125
+ getFlatLayersAddWms() {
126
+ if (!this.wmsClients) {
127
+ return [];
128
+ }
129
+ const wmsLayers = [];
130
+ Array.from(this.wmsClients.values()).forEach((wmsClient) => {
131
+ wmsClient.getLayerWmsArrays().forEach((layerWmsArray) => {
132
+ // Keep only one LayerWms, but push every layer "layers" of its group in the LayerWms, keep order.
133
+ layerWmsArray.sort((lWms1, lWms2) => lWms1.order - lWms2.order);
134
+ const layersLayers = [];
135
+ layerWmsArray.forEach((lWms) => {
136
+ if (lWms.layers) {
137
+ layersLayers.push(lWms.layers);
138
+ }
139
+ });
140
+ const firstLayerClone = layerWmsArray[0].clone();
141
+ firstLayerClone.layers = [...layersLayers].reverse().join(',');
142
+ wmsLayers.push(firstLayerClone);
143
+ });
144
+ });
145
+ return wmsLayers;
146
+ }
89
147
  /**
90
148
  * Encode special layers, meaning not-in-the-layer-tree layers.
91
149
  * These layers are from the mapManager.getLayersToPrint method.
@@ -130,9 +188,6 @@ export default class MFPEncoder {
130
188
  * @returns A promise that resolves to an array of MFP layers, a single MFP layer, or null.
131
189
  */
132
190
  encodeLayer(layer) {
133
- if (layer instanceof GroupLayer) {
134
- return this.encodeGroupLayer(layer);
135
- }
136
191
  if (layer instanceof LayerWms || layer instanceof LayerWmsExternal) {
137
192
  return this.encodeWmsLayer(layer);
138
193
  }
@@ -145,33 +200,6 @@ export default class MFPEncoder {
145
200
  console.warn('Unsupported layer type for encoding: ', layer);
146
201
  return null;
147
202
  }
148
- /**
149
- * Only non mixed groups of WMS layers are supported.
150
- *
151
- * Will convert a group of WMS layers sharing the same OGC server into a single MFPWmsLayer
152
- * where its 'layers' property is a concatenation of all child layers' 'layers' property.
153
- *
154
- * @param groupLayer
155
- */
156
- encodeGroupLayer(groupLayer) {
157
- if (groupLayer.isMixed) {
158
- console.error("A mixed group layer is passed to print and shouldn't", groupLayer);
159
- return null;
160
- }
161
- if (groupLayer.hasGrandChildren) {
162
- console.error("A group layer that has grandchildren is passed to print and shouldn't", groupLayer);
163
- return null;
164
- }
165
- const firstWmsLayer = groupLayer.children.shift();
166
- const spec = this.encodeWmsLayer(firstWmsLayer);
167
- if (!spec) {
168
- return this.encodeGroupLayer(groupLayer);
169
- }
170
- for (const childLayer of groupLayer.children) {
171
- spec.layers.push(childLayer.layers || '');
172
- }
173
- return spec;
174
- }
175
203
  /**
176
204
  * Encodes an image layer from a WMS layer object.
177
205
  * @returns The encoded image layer or null if the layer is not visible.
@@ -289,4 +317,8 @@ export default class MFPEncoder {
289
317
  layerWms.opacity = layerWmts.opacity;
290
318
  return this.encodeWmsLayer(layerWms);
291
319
  }
320
+ clear() {
321
+ this.mapInternal = null;
322
+ this.wmsClients = null;
323
+ }
292
324
  }
@@ -28,12 +28,12 @@ declare class GroupLayer extends BaseLayer implements ILayerWithTime {
28
28
  get inactive(): boolean;
29
29
  get semiActive(): boolean;
30
30
  get hasTimeRestriction(): boolean;
31
- get hasGrandChildren(): boolean;
32
31
  isFirstLevelGroup(): boolean;
33
32
  setDefaultTimeRestriction(): void;
34
33
  /**
35
- * Checks if all the children are LayerWms with the same ogcServer, opacity
36
- * time
34
+ * This is not supposed to be used anymore.
35
+ * Now the WmsClient groups the layers itself.
36
+ * @deprecated
37
37
  */
38
38
  get isMixed(): boolean;
39
39
  }
@@ -1,7 +1,6 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import BaseLayer from './baselayer.js';
3
3
  import LayerTimeFormatter from '../../tools/time/layertimeformatter.js';
4
- import LayerWms from './layerwms.js';
5
4
  /*
6
5
  * This class is used in the state of the application, which will be accessed behind a JavaScript proxy.
7
6
  * This means that each modification made to its properties must come from outside,
@@ -68,14 +67,6 @@ class GroupLayer extends BaseLayer {
68
67
  get hasTimeRestriction() {
69
68
  return !!this.timeRestriction;
70
69
  }
71
- get hasGrandChildren() {
72
- for (const child of this.children) {
73
- if (child.children?.length) {
74
- return true;
75
- }
76
- }
77
- return false;
78
- }
79
70
  isFirstLevelGroup() {
80
71
  return !(this.parent instanceof GroupLayer);
81
72
  }
@@ -86,47 +77,13 @@ class GroupLayer extends BaseLayer {
86
77
  }
87
78
  }
88
79
  /**
89
- * Checks if all the children are LayerWms with the same ogcServer, opacity
90
- * time
80
+ * This is not supposed to be used anymore.
81
+ * Now the WmsClient groups the layers itself.
82
+ * @deprecated
91
83
  */
92
84
  get isMixed() {
93
- // It was explicitly set to true, it can't be unmixed
94
- if (this._isMixed) {
95
- return this._isMixed;
96
- }
97
- // If any child is not a GroupLayer or LayerWms, return true immediately
98
- for (const child of this.children) {
99
- if (!(child instanceof GroupLayer) && !(child instanceof LayerWms)) {
100
- return true;
101
- }
102
- }
103
- // Collect all LayerWms children and grandchildren recursively
104
- const layerWmsList = [];
105
- function collectLayerWms(layer) {
106
- if (layer instanceof LayerWms) {
107
- layerWmsList.push(layer);
108
- }
109
- else if (layer instanceof GroupLayer) {
110
- for (const child of layer.children) {
111
- collectLayerWms(child);
112
- }
113
- }
114
- }
115
- for (const child of this.children) {
116
- collectLayerWms(child);
117
- }
118
- // Check if all LayerWms have the same properties
119
- if (layerWmsList.length > 0) {
120
- const first = layerWmsList[0];
121
- const allSame = layerWmsList.every((lw) => lw.opacity === first.opacity &&
122
- lw.ogcServer === first.ogcServer &&
123
- lw.filter === first.filter &&
124
- lw.timeRestriction === first.timeRestriction);
125
- if (allSame) {
126
- return false;
127
- }
128
- }
129
- return true;
85
+ console.error('This property must not be used.');
86
+ return !!this._isMixed;
130
87
  }
131
88
  }
132
89
  export default GroupLayer;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geogirafe.org"
7
7
  },
8
- "version": "1.3.0-dev.3018313151",
8
+ "version": "1.3.0-dev.3046054236",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.3.0-dev.3018313151", "build":"3018313151", "date":"02/11/2026"}
1
+ {"version":"1.3.0-dev.3046054236", "build":"3046054236", "date":"09/11/2026"}
package/tools/main.d.ts CHANGED
@@ -167,6 +167,7 @@ export type { WfsOperator } from './wfs/wfsfiltercondition.js';
167
167
  export { default as WfsFilterCondition, isWfsOperator } from './wfs/wfsfiltercondition.js';
168
168
  export { default as WfsManager } from './wfs/wfsmanager.js';
169
169
  export { default as WfsParser } from './wfs/wfsparser.js';
170
+ export type { PairedLayer, GroupLayerInfo } from './wms/wmsclient.js';
170
171
  export { default as WmsClient, WmsClientQgis, WmsClientMapServer, WmsClientDefault, WmsClientGeoServer } from './wms/wmsclient.js';
171
172
  export { default as WmsLegendHelper } from './wms/wmslegendhelper.js';
172
173
  export { default as WmsManager } from './wms/wmsmanager.js';
@@ -1,4 +1,4 @@
1
1
  import LayerWms from '../../models/layers/layerwms';
2
2
  import ServerOgc from '../../models/serverogc';
3
- export declare const mockOgcServers: Record<string, ServerOgc>;
4
- export declare const mockWmsLayers: Record<string, LayerWms>;
3
+ export declare const createMockOgcServers: () => Record<string, ServerOgc>;
4
+ export declare const createMockWmsLayers: () => Record<string, LayerWms>;
@@ -1,66 +1,73 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import LayerWms from '../../models/layers/layerwms';
3
3
  import ServerOgc from '../../models/serverogc';
4
- export const mockOgcServers = {
5
- 'QGIS-1-has-wfs': new ServerOgc('QGIS-1-has-wfs', {
6
- url: 'https://qgis-wms-1.test.url',
7
- wfsSupport: true,
8
- urlWfs: 'https://wfs-1.url',
9
- type: 'qgisserver',
10
- imageType: 'image/png'
11
- }),
12
- 'QGIS-2-has-wfs': new ServerOgc('QGIS-2-has-wfs', {
13
- url: 'https://qgis-wms-2.test.url',
14
- wfsSupport: true,
15
- urlWfs: 'https://qgis-wfs-2.url',
16
- type: 'qgisserver',
17
- imageType: 'image/png'
18
- }),
19
- 'QGIS-3-no-wfs': new ServerOgc('QGIS-3-no-wfs', {
20
- url: 'https://qgis-wms-3.test.url',
21
- wfsSupport: false,
22
- type: 'qgisserver',
23
- imageType: 'image/png'
24
- }),
25
- 'MapServer-1-has-wfs': new ServerOgc('MapServer-1-has-wfs', {
26
- url: 'https://ms-wms-1.test.url',
27
- wfsSupport: true,
28
- urlWfs: 'https://ms-wfs-1.url',
29
- type: 'mapserver',
30
- imageType: 'image/png'
31
- }),
32
- 'MapServer-2-has-wfs': new ServerOgc('MapServer-2-has-wfs', {
33
- url: 'https://ms-wms-2.test.url',
34
- wfsSupport: true,
35
- urlWfs: 'https://ms-wfs-2.url',
36
- type: 'mapserver',
37
- imageType: 'image/png'
38
- }),
39
- 'MapServer-3-no-wfs': new ServerOgc('MapServer-3-no-wfs', {
40
- url: 'https://ms-wms-3.test.url',
41
- wfsSupport: false,
42
- type: 'mapserver',
43
- imageType: 'image/png'
44
- })
4
+ export const createMockOgcServers = () => {
5
+ return {
6
+ 'QGIS-1-has-wfs': new ServerOgc('QGIS-1-has-wfs', {
7
+ url: 'https://qgis-wms-1.test.url',
8
+ wfsSupport: true,
9
+ urlWfs: 'https://wfs-1.url',
10
+ type: 'qgisserver',
11
+ imageType: 'image/png'
12
+ }),
13
+ 'QGIS-2-has-wfs': new ServerOgc('QGIS-2-has-wfs', {
14
+ url: 'https://qgis-wms-2.test.url',
15
+ wfsSupport: true,
16
+ urlWfs: 'https://qgis-wfs-2.url',
17
+ type: 'qgisserver',
18
+ imageType: 'image/png'
19
+ }),
20
+ 'QGIS-3-no-wfs': new ServerOgc('QGIS-3-no-wfs', {
21
+ url: 'https://qgis-wms-3.test.url',
22
+ wfsSupport: false,
23
+ type: 'qgisserver',
24
+ imageType: 'image/png'
25
+ }),
26
+ 'MapServer-1-has-wfs': new ServerOgc('MapServer-1-has-wfs', {
27
+ url: 'https://ms-wms-1.test.url',
28
+ wfsSupport: true,
29
+ urlWfs: 'https://ms-wfs-1.url',
30
+ type: 'mapserver',
31
+ imageType: 'image/png'
32
+ }),
33
+ 'MapServer-2-has-wfs': new ServerOgc('MapServer-2-has-wfs', {
34
+ url: 'https://ms-wms-2.test.url',
35
+ wfsSupport: true,
36
+ urlWfs: 'https://ms-wfs-2.url',
37
+ type: 'mapserver',
38
+ imageType: 'image/png'
39
+ }),
40
+ 'MapServer-3-no-wfs': new ServerOgc('MapServer-3-no-wfs', {
41
+ url: 'https://ms-wms-3.test.url',
42
+ wfsSupport: false,
43
+ type: 'mapserver',
44
+ imageType: 'image/png'
45
+ })
46
+ };
45
47
  };
46
- export const mockWmsLayers = {
47
- 'qgis1-layer1': new LayerWms(1, 'qgis1-layer1', 1, mockOgcServers['QGIS-1-has-wfs'], {
48
- queryable: true,
49
- queryLayers: 'qgis1-ql1,qgis1-ql2,qgis1-ql3'
50
- }), // multiple queryLayers
51
- 'qgis1-layer2': new LayerWms(1, 'qgis1-layer2', 1, mockOgcServers['QGIS-1-has-wfs'], {
52
- queryable: true,
53
- queryLayers: 'qgis1-ql3,qgis1-ql4',
54
- opacity: 0.5
55
- }), // opacity: wmsClient independantLayer
56
- 'qgis1-layer3': new LayerWms(1, 'qgis1-layer3', 1, mockOgcServers['QGIS-1-has-wfs'], {}), // layer without wfs on wfs-able server: should be ok
57
- 'qgis2-layer1': new LayerWms(1, 'qgis2-layer1', 1, mockOgcServers['QGIS-2-has-wfs'], {
58
- queryable: true,
59
- queryLayers: 'qgis2-ql3'
60
- }), //single queryLayer
61
- 'qgis3-layer1': new LayerWms(1, 'qgis3-layer1', 1, mockOgcServers['QGIS-3-no-wfs'], {}), // layer without wfs on server without wfs: no problemo
62
- 'qgis3-layer2': new LayerWms(1, 'qgis3-layer2', 1, mockOgcServers['QGIS-3-no-wfs'], {
63
- queryable: true,
64
- queryLayers: 'qgis3-ql1nono'
65
- }) // queryable layer on server without wfs: problemo
48
+ export const createMockWmsLayers = () => {
49
+ const mockOgcServers = createMockOgcServers();
50
+ return {
51
+ 'qgis1-layer1': new LayerWms(1, 'qgis1-layer1', 1, mockOgcServers['QGIS-1-has-wfs'], {
52
+ queryable: true,
53
+ queryLayers: 'qgis1-ql1,qgis1-ql2,qgis1-ql3'
54
+ }), // multiple queryLayers
55
+ 'qgis1-layer2': new LayerWms(1, 'qgis1-layer2', 2, mockOgcServers['QGIS-1-has-wfs'], {
56
+ queryable: true,
57
+ queryLayers: 'qgis1-ql3,qgis1-ql4',
58
+ opacity: 0.5
59
+ }), // opacity: another group of layers.
60
+ 'qgis1-layer3': new LayerWms(1, 'qgis1-layer3', 3, mockOgcServers['QGIS-1-has-wfs'], {}), // layer without wfs on wfs-able server: should be ok
61
+ 'qgis1-layer4': new LayerWms(1, 'qgis1-layer4', 4, mockOgcServers['QGIS-1-has-wfs'], {}), // Same layer, can be requested with the previous one.
62
+ 'qgis1-layer5': new LayerWms(1, 'qgis1-layer5', 0, mockOgcServers['QGIS-1-has-wfs'], {}), // Same but ORDER = 0! (change grouping)
63
+ 'qgis2-layer1': new LayerWms(1, 'qgis2-layer1', 6, mockOgcServers['QGIS-2-has-wfs'], {
64
+ queryable: true,
65
+ queryLayers: 'qgis2-ql3'
66
+ }), //single queryLayer
67
+ 'qgis3-layer1': new LayerWms(1, 'qgis3-layer1', 7, mockOgcServers['QGIS-3-no-wfs'], {}), // layer without wfs on server without wfs: no problemo
68
+ 'qgis3-layer2': new LayerWms(1, 'qgis3-layer2', 8, mockOgcServers['QGIS-3-no-wfs'], {
69
+ queryable: true,
70
+ queryLayers: 'qgis3-ql1nono'
71
+ }) // queryable layer on server without wfs: problemo
72
+ };
66
73
  };