@eeacms/volto-arcgis-block 0.1.477 → 0.1.478
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.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [0.1.478](https://github.com/eea/volto-arcgis-block/compare/0.1.477...0.1.478) - 3 September 2026
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- style: Automated code fix [eea-jenkins - [`60974df`](https://github.com/eea/volto-arcgis-block/commit/60974df4c4d0af3f58e5b7845d408a9d0f022ccd)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- (bug): Update WMS endpoint and parameters to restore map layer visualization [Unai Bolivar - [`1597090`](https://github.com/eea/volto-arcgis-block/commit/15970909fa22e24c78b2f6b3d83eb304e7fd039a)]
|
|
7
16
|
### [0.1.477](https://github.com/eea/volto-arcgis-block/compare/0.1.476...0.1.477) - 2 September 2026
|
|
8
17
|
|
|
9
18
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -137,80 +137,192 @@ class HotspotWidget extends React.Component {
|
|
|
137
137
|
return legendLinkUrl + legend;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
getHotspotWmsConfig() {
|
|
141
|
+
return {
|
|
142
|
+
endpoint:
|
|
143
|
+
this.urls.hotspotWmsEndpoint ||
|
|
144
|
+
'https://geospatial.jrc.ec.europa.eu/geoserver/hsm/wms',
|
|
145
|
+
version: this.urls.hotspotWmsVersion || '1.1.0',
|
|
146
|
+
srs: this.urls.hotspotWmsSrs || 'EPSG:3857',
|
|
147
|
+
layerNames: this.urls.hotspotWmsLayerNames || {
|
|
148
|
+
lcc: {
|
|
149
|
+
a: 'hsm:lcc_a_pols',
|
|
150
|
+
b: 'hsm:lcc_b_pols',
|
|
151
|
+
},
|
|
152
|
+
lc: {
|
|
153
|
+
a: 'hsm:present_lc_a_pols',
|
|
154
|
+
b: 'hsm:present_lc_b_pols',
|
|
155
|
+
},
|
|
156
|
+
klc: 'hsm:cop_klc',
|
|
157
|
+
pa: 'hsm:protected_areas',
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
resolveLayerVariant(activeLayers, type) {
|
|
163
|
+
if (!Array.isArray(activeLayers) || !activeLayers.length) return 'b';
|
|
164
|
+
const hasVariantA = activeLayers.some((layer) =>
|
|
165
|
+
layer.includes(type === 'lcc' ? 'all_lcc_a_pol' : 'all_present_lc_a_pol'),
|
|
166
|
+
);
|
|
167
|
+
return hasVariantA ? 'a' : 'b';
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
resolveWmsLayerName(type, variant) {
|
|
171
|
+
const config = this.getHotspotWmsConfig();
|
|
172
|
+
if (type === 'lcc') {
|
|
173
|
+
return config.layerNames.lcc[variant] || config.layerNames.lcc.b;
|
|
174
|
+
}
|
|
175
|
+
if (type === 'lc') {
|
|
176
|
+
return config.layerNames.lc[variant] || config.layerNames.lc.b;
|
|
177
|
+
}
|
|
178
|
+
if (type === 'klc') {
|
|
179
|
+
return config.layerNames.klc;
|
|
180
|
+
}
|
|
181
|
+
if (type === 'pa') {
|
|
182
|
+
return config.layerNames.pa;
|
|
183
|
+
}
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
buildCqlFilter(klcCode, date) {
|
|
188
|
+
const baseFilter =
|
|
189
|
+
"klc_code LIKE '" + klcCode + "' AND in_pa LIKE 'not_defined'";
|
|
190
|
+
if (!Number.isFinite(Number(date))) {
|
|
191
|
+
return baseFilter;
|
|
192
|
+
}
|
|
193
|
+
return baseFilter + ' AND date=' + Number(date);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
buildWmsCustomLayerParameters(cqlFilter) {
|
|
197
|
+
const config = this.getHotspotWmsConfig();
|
|
198
|
+
return {
|
|
199
|
+
SERVICE: 'WMS',
|
|
200
|
+
REQUEST: 'GetMap',
|
|
201
|
+
FORMAT: 'image/png',
|
|
202
|
+
TRANSPARENT: 'true',
|
|
203
|
+
tiled: 'true',
|
|
204
|
+
STYLES: '',
|
|
205
|
+
VERSION: config.version,
|
|
206
|
+
SRS: config.srs,
|
|
207
|
+
CQL_FILTER: cqlFilter,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
resolveLccDateOptions(
|
|
212
|
+
klcCode,
|
|
213
|
+
selectedLcYear,
|
|
214
|
+
lccDatesByLcYear,
|
|
215
|
+
lccDateList,
|
|
216
|
+
) {
|
|
217
|
+
const klcLcDateMap = {
|
|
218
|
+
CAF_02: {
|
|
219
|
+
2016: [2000, 2019],
|
|
220
|
+
2019: [2024],
|
|
221
|
+
},
|
|
222
|
+
CAF_05: {
|
|
223
|
+
2015: [2000, 2019],
|
|
224
|
+
2019: [2024],
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
const mappedByKlc = klcLcDateMap[klcCode] || null;
|
|
229
|
+
if (mappedByKlc && Number.isFinite(Number(selectedLcYear))) {
|
|
230
|
+
const mapped = mappedByKlc[Number(selectedLcYear)];
|
|
231
|
+
if (Array.isArray(mapped) && mapped.length) {
|
|
232
|
+
return Array.from(new Set(mapped)).sort((a, b) => a - b);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const mappedByData = Number.isFinite(Number(selectedLcYear))
|
|
237
|
+
? lccDatesByLcYear[Number(selectedLcYear)]
|
|
238
|
+
: null;
|
|
239
|
+
if (Array.isArray(mappedByData) && mappedByData.length) {
|
|
240
|
+
return mappedByData;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return lccDateList;
|
|
244
|
+
}
|
|
245
|
+
|
|
140
246
|
layerModelInit() {
|
|
141
|
-
const serviceUrl = this.
|
|
247
|
+
const serviceUrl = this.getHotspotWmsConfig().endpoint;
|
|
142
248
|
this.esriLayer_lcc = new WMSLayer({
|
|
143
249
|
url: serviceUrl,
|
|
250
|
+
version: this.getHotspotWmsConfig().version,
|
|
144
251
|
title: '',
|
|
145
252
|
//featureInfoFormat: "application/json",
|
|
146
|
-
customLayerParameters:
|
|
253
|
+
customLayerParameters: this.buildWmsCustomLayerParameters(''),
|
|
147
254
|
sublayers: [
|
|
148
255
|
// LAND COVER CHANGE DATASET ________________________________________________________________________________________________________________
|
|
149
256
|
{
|
|
150
|
-
name: this.addLegendName('
|
|
257
|
+
name: this.addLegendName(this.resolveWmsLayerName('lcc', 'a')),
|
|
151
258
|
legendUrl: this.addLegendNameToUrl('all_lcc_a_pol'),
|
|
152
259
|
},
|
|
153
260
|
],
|
|
154
261
|
});
|
|
155
262
|
this.esriLayer_lcc = new WMSLayer({
|
|
156
263
|
url: serviceUrl,
|
|
264
|
+
version: this.getHotspotWmsConfig().version,
|
|
157
265
|
title: '',
|
|
158
266
|
//featureInfoFormat: "application/json",
|
|
159
|
-
customLayerParameters:
|
|
267
|
+
customLayerParameters: this.buildWmsCustomLayerParameters(''),
|
|
160
268
|
sublayers: [
|
|
161
269
|
// LAND COVER CHANGE DATASET ________________________________________________________________________________________________________________
|
|
162
270
|
{
|
|
163
|
-
name: this.addLegendName('
|
|
271
|
+
name: this.addLegendName(this.resolveWmsLayerName('lcc', 'b')),
|
|
164
272
|
legendUrl: this.addLegendNameToUrl('all_lcc_b_pol'),
|
|
165
273
|
},
|
|
166
274
|
],
|
|
167
275
|
});
|
|
168
276
|
this.esriLayer_lc = new WMSLayer({
|
|
169
277
|
url: serviceUrl,
|
|
278
|
+
version: this.getHotspotWmsConfig().version,
|
|
170
279
|
title: '',
|
|
171
280
|
//featureInfoFormat: "application/json",
|
|
172
|
-
customLayerParameters:
|
|
281
|
+
customLayerParameters: this.buildWmsCustomLayerParameters(''),
|
|
173
282
|
sublayers: [
|
|
174
283
|
// PRESENT LAND COVER DATASET ________________________________________________________________________________________________________________
|
|
175
284
|
{
|
|
176
|
-
name: this.addLegendName('
|
|
285
|
+
name: this.addLegendName(this.resolveWmsLayerName('lc', 'a')),
|
|
177
286
|
legendUrl: this.addLegendNameToUrl('all_present_lc_a_pol'),
|
|
178
287
|
},
|
|
179
288
|
],
|
|
180
289
|
});
|
|
181
290
|
this.esriLayer_lc = new WMSLayer({
|
|
182
291
|
url: serviceUrl,
|
|
292
|
+
version: this.getHotspotWmsConfig().version,
|
|
183
293
|
title: '',
|
|
184
294
|
//featureInfoFormat: "application/json",
|
|
185
|
-
customLayerParameters:
|
|
295
|
+
customLayerParameters: this.buildWmsCustomLayerParameters(''),
|
|
186
296
|
sublayers: [
|
|
187
297
|
// PRESENT LAND COVER DATASET ________________________________________________________________________________________________________________
|
|
188
298
|
{
|
|
189
|
-
name: this.addLegendName('
|
|
299
|
+
name: this.addLegendName(this.resolveWmsLayerName('lc', 'b')),
|
|
190
300
|
legendUrl: this.addLegendNameToUrl('all_present_lc_b_pol'),
|
|
191
301
|
},
|
|
192
302
|
],
|
|
193
303
|
});
|
|
194
304
|
this.esriLayer_klc = new WMSLayer({
|
|
195
305
|
url: serviceUrl,
|
|
306
|
+
version: this.getHotspotWmsConfig().version,
|
|
196
307
|
title: '',
|
|
197
308
|
//featureInfoFormat: "application/json",
|
|
198
|
-
customLayerParameters:
|
|
309
|
+
customLayerParameters: this.buildWmsCustomLayerParameters(''),
|
|
199
310
|
sublayers: [
|
|
200
311
|
{
|
|
201
|
-
name: this.addLegendName('
|
|
312
|
+
name: this.addLegendName(this.resolveWmsLayerName('klc')),
|
|
202
313
|
legendUrl: this.addLegendNameToUrl('cop_klc'),
|
|
203
314
|
},
|
|
204
315
|
],
|
|
205
316
|
});
|
|
206
317
|
this.esriLayer_pa = new WMSLayer({
|
|
207
318
|
url: serviceUrl,
|
|
319
|
+
version: this.getHotspotWmsConfig().version,
|
|
208
320
|
title: '',
|
|
209
321
|
//featureInfoFormat: "application/json",
|
|
210
|
-
customLayerParameters:
|
|
322
|
+
customLayerParameters: this.buildWmsCustomLayerParameters(''),
|
|
211
323
|
sublayers: [
|
|
212
324
|
{
|
|
213
|
-
name: this.addLegendName('
|
|
325
|
+
name: this.addLegendName(this.resolveWmsLayerName('pa')),
|
|
214
326
|
legendUrl: this.addLegendNameToUrl('protected_areas'),
|
|
215
327
|
},
|
|
216
328
|
],
|
|
@@ -277,17 +389,12 @@ class HotspotWidget extends React.Component {
|
|
|
277
389
|
.value.match(/\d+/g)
|
|
278
390
|
.map(Number)[0];
|
|
279
391
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
} else {
|
|
287
|
-
typeLegend = 'all_lcc_b_pol';
|
|
288
|
-
title = 'Modular Land Cover Change in selected Hot Spots';
|
|
289
|
-
}
|
|
290
|
-
}
|
|
392
|
+
const layerVariant = this.resolveLayerVariant(activeLayers, 'lcc');
|
|
393
|
+
typeLegend = layerVariant === 'a' ? 'all_lcc_a_pol' : 'all_lcc_b_pol';
|
|
394
|
+
title =
|
|
395
|
+
layerVariant === 'a'
|
|
396
|
+
? 'Dichotomous Land Cover Change in selected Hot Spots'
|
|
397
|
+
: 'Modular Land Cover Change in selected Hot Spots';
|
|
291
398
|
|
|
292
399
|
this.addFilteredLayersData(
|
|
293
400
|
filteredLayersData,
|
|
@@ -298,7 +405,9 @@ class HotspotWidget extends React.Component {
|
|
|
298
405
|
|
|
299
406
|
filterLayer = this.esriLayer_lcc;
|
|
300
407
|
|
|
301
|
-
filterLayer.sublayers.items[0].name = this.addLegendName(
|
|
408
|
+
filterLayer.sublayers.items[0].name = this.addLegendName(
|
|
409
|
+
this.resolveWmsLayerName('lcc', layerVariant),
|
|
410
|
+
);
|
|
302
411
|
filterLayer.sublayers.items[0].legendUrl =
|
|
303
412
|
this.addLegendNameToUrl(typeLegend);
|
|
304
413
|
filterLayer.sublayers.items[0].title = title;
|
|
@@ -307,30 +416,27 @@ class HotspotWidget extends React.Component {
|
|
|
307
416
|
bookmarkHotspotFilter.filteredLayers &&
|
|
308
417
|
bookmarkHotspotFilter.filteredLayers['lcc_filter'] !== undefined
|
|
309
418
|
) {
|
|
310
|
-
filterLayer.customLayerParameters
|
|
311
|
-
|
|
419
|
+
filterLayer.customLayerParameters =
|
|
420
|
+
this.buildWmsCustomLayerParameters(
|
|
421
|
+
bookmarkHotspotFilter.filteredLayers['lcc_filter'],
|
|
422
|
+
);
|
|
312
423
|
} else {
|
|
313
|
-
filterLayer.customLayerParameters
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
"'" +
|
|
318
|
-
" AND in_pa = 'not_defined' AND date = " +
|
|
319
|
-
selectBoxHighlightsLcc;
|
|
424
|
+
filterLayer.customLayerParameters =
|
|
425
|
+
this.buildWmsCustomLayerParameters(
|
|
426
|
+
this.buildCqlFilter(this.dataKlc_code, selectBoxHighlightsLcc),
|
|
427
|
+
);
|
|
320
428
|
}
|
|
321
429
|
}
|
|
322
430
|
if (type === 'lc') {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
}
|
|
431
|
+
const layerVariant = this.resolveLayerVariant(activeLayers, 'lc');
|
|
432
|
+
typeLegend =
|
|
433
|
+
layerVariant === 'a'
|
|
434
|
+
? 'all_present_lc_a_pol'
|
|
435
|
+
: 'all_present_lc_b_pol';
|
|
436
|
+
title =
|
|
437
|
+
layerVariant === 'a'
|
|
438
|
+
? 'Dichotomous Present Land Cover in selected Hot Spots'
|
|
439
|
+
: 'Modular Present Land Cover in selected Hot Spots';
|
|
334
440
|
|
|
335
441
|
let selectLcBoxTime =
|
|
336
442
|
document.getElementById('select-klc-lcTime').value;
|
|
@@ -353,7 +459,9 @@ class HotspotWidget extends React.Component {
|
|
|
353
459
|
|
|
354
460
|
filterLayer = this.esriLayer_lc;
|
|
355
461
|
|
|
356
|
-
filterLayer.sublayers.items[0].name = this.addLegendName(
|
|
462
|
+
filterLayer.sublayers.items[0].name = this.addLegendName(
|
|
463
|
+
this.resolveWmsLayerName('lc', layerVariant),
|
|
464
|
+
);
|
|
357
465
|
filterLayer.sublayers.items[0].legendUrl =
|
|
358
466
|
this.addLegendNameToUrl(typeLegend);
|
|
359
467
|
filterLayer.sublayers.items[0].title = title;
|
|
@@ -362,16 +470,15 @@ class HotspotWidget extends React.Component {
|
|
|
362
470
|
bookmarkHotspotFilter.filteredLayers &&
|
|
363
471
|
bookmarkHotspotFilter.filteredLayers['lc_filter'] !== undefined
|
|
364
472
|
) {
|
|
365
|
-
filterLayer.customLayerParameters
|
|
366
|
-
|
|
473
|
+
filterLayer.customLayerParameters =
|
|
474
|
+
this.buildWmsCustomLayerParameters(
|
|
475
|
+
bookmarkHotspotFilter.filteredLayers['lc_filter'],
|
|
476
|
+
);
|
|
367
477
|
} else {
|
|
368
|
-
filterLayer.customLayerParameters
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
"'" +
|
|
373
|
-
" AND in_pa = 'not_defined' AND date = " +
|
|
374
|
-
selectBoxHighlightsLc;
|
|
478
|
+
filterLayer.customLayerParameters =
|
|
479
|
+
this.buildWmsCustomLayerParameters(
|
|
480
|
+
this.buildCqlFilter(this.dataKlc_code, selectBoxHighlightsLc),
|
|
481
|
+
);
|
|
375
482
|
}
|
|
376
483
|
}
|
|
377
484
|
if (type === 'klc') {
|
|
@@ -381,13 +488,20 @@ class HotspotWidget extends React.Component {
|
|
|
381
488
|
bookmarkHotspotFilter.filteredLayers &&
|
|
382
489
|
bookmarkHotspotFilter.filteredLayers['klc_filter'] !== undefined
|
|
383
490
|
) {
|
|
384
|
-
this.esriLayer_klc.customLayerParameters
|
|
385
|
-
|
|
491
|
+
this.esriLayer_klc.customLayerParameters =
|
|
492
|
+
this.buildWmsCustomLayerParameters(
|
|
493
|
+
bookmarkHotspotFilter.filteredLayers['klc_filter'],
|
|
494
|
+
);
|
|
386
495
|
} else {
|
|
387
|
-
this.esriLayer_klc.customLayerParameters
|
|
388
|
-
|
|
496
|
+
this.esriLayer_klc.customLayerParameters =
|
|
497
|
+
this.buildWmsCustomLayerParameters(
|
|
498
|
+
"klc_code LIKE '" + this.dataKlc_code + "'",
|
|
499
|
+
);
|
|
389
500
|
}
|
|
390
501
|
filterLayer = this.esriLayer_klc;
|
|
502
|
+
filterLayer.sublayers.items[0].name = this.addLegendName(
|
|
503
|
+
this.resolveWmsLayerName('klc'),
|
|
504
|
+
);
|
|
391
505
|
filterLayer.sublayers.items[0].title = title;
|
|
392
506
|
}
|
|
393
507
|
if (type === 'pa') {
|
|
@@ -398,13 +512,20 @@ class HotspotWidget extends React.Component {
|
|
|
398
512
|
bookmarkHotspotFilter.filteredLayers &&
|
|
399
513
|
bookmarkHotspotFilter.filteredLayers['pa_filter'] !== undefined
|
|
400
514
|
) {
|
|
401
|
-
this.esriLayer_pa.customLayerParameters
|
|
402
|
-
|
|
515
|
+
this.esriLayer_pa.customLayerParameters =
|
|
516
|
+
this.buildWmsCustomLayerParameters(
|
|
517
|
+
bookmarkHotspotFilter.filteredLayers['pa_filter'],
|
|
518
|
+
);
|
|
403
519
|
} else {
|
|
404
|
-
this.esriLayer_pa.customLayerParameters
|
|
405
|
-
|
|
520
|
+
this.esriLayer_pa.customLayerParameters =
|
|
521
|
+
this.buildWmsCustomLayerParameters(
|
|
522
|
+
"klc_code LIKE '" + this.dataKlc_code + "'",
|
|
523
|
+
);
|
|
406
524
|
}
|
|
407
525
|
filterLayer = this.esriLayer_pa;
|
|
526
|
+
filterLayer.sublayers.items[0].name = this.addLegendName(
|
|
527
|
+
this.resolveWmsLayerName('pa'),
|
|
528
|
+
);
|
|
408
529
|
filterLayer.sublayers.items[0].title = title;
|
|
409
530
|
}
|
|
410
531
|
layersToAdd[type + '_filter'] = filterLayer;
|
|
@@ -799,13 +920,12 @@ class HotspotWidget extends React.Component {
|
|
|
799
920
|
}
|
|
800
921
|
|
|
801
922
|
const selectedLcYear = Number(this.state.lcYear);
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
: lccDateList;
|
|
923
|
+
const lccOptionsToUse = this.resolveLccDateOptions(
|
|
924
|
+
data[i].node.klc_code,
|
|
925
|
+
selectedLcYear,
|
|
926
|
+
lccDatesByLcYear,
|
|
927
|
+
lccDateList,
|
|
928
|
+
);
|
|
809
929
|
|
|
810
930
|
lccOptionsToUse.forEach((element) => {
|
|
811
931
|
selectBoxLccTime.options.add(new Option(element, element, element));
|
|
@@ -1016,13 +1136,12 @@ class HotspotWidget extends React.Component {
|
|
|
1016
1136
|
});
|
|
1017
1137
|
|
|
1018
1138
|
const selectedLcYear = Number(this.state.lcYear);
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
: lccDateList;
|
|
1139
|
+
const lccOptionsToUse = this.resolveLccDateOptions(
|
|
1140
|
+
selectedNode.klc_code,
|
|
1141
|
+
selectedLcYear,
|
|
1142
|
+
lccDatesByLcYear,
|
|
1143
|
+
lccDateList,
|
|
1144
|
+
);
|
|
1026
1145
|
|
|
1027
1146
|
this.removeOptions(selectBoxLccTime);
|
|
1028
1147
|
selectBoxLccTime.options.add(
|
|
@@ -8017,6 +8017,7 @@ class MenuWidget extends React.Component {
|
|
|
8017
8017
|
}
|
|
8018
8018
|
|
|
8019
8019
|
deleteFilteredLayer(layer) {
|
|
8020
|
+
if (!layer || !this.props || !this.props.map) return;
|
|
8020
8021
|
if (
|
|
8021
8022
|
!(
|
|
8022
8023
|
layer.includes('all_lcc') ||
|
|
@@ -8027,9 +8028,13 @@ class MenuWidget extends React.Component {
|
|
|
8027
8028
|
)
|
|
8028
8029
|
return;
|
|
8029
8030
|
let filterLayer;
|
|
8030
|
-
|
|
8031
|
-
let
|
|
8032
|
-
|
|
8031
|
+
let updatedHotspotData = this.props.hotspotData || {};
|
|
8032
|
+
let updatedFilteredLayers =
|
|
8033
|
+
updatedHotspotData &&
|
|
8034
|
+
updatedHotspotData['filteredLayers'] &&
|
|
8035
|
+
typeof updatedHotspotData['filteredLayers'] === 'object'
|
|
8036
|
+
? updatedHotspotData['filteredLayers']
|
|
8037
|
+
: {};
|
|
8033
8038
|
if (this.layers['lcc_filter'] && layer.includes('all_lcc')) {
|
|
8034
8039
|
this.layers['lcc_filter'].visible = false;
|
|
8035
8040
|
filterLayer = this.props.map.findLayerById('lcc_filter');
|
|
@@ -8055,7 +8060,9 @@ class MenuWidget extends React.Component {
|
|
|
8055
8060
|
layer.includes('cop_klc')
|
|
8056
8061
|
) {
|
|
8057
8062
|
this.layers['klc_filter'].visible = false;
|
|
8058
|
-
this.layers[layer]
|
|
8063
|
+
if (this.layers[layer]) {
|
|
8064
|
+
this.layers[layer].visible = false;
|
|
8065
|
+
}
|
|
8059
8066
|
filterLayer = this.props.map.findLayerById('klc_filter');
|
|
8060
8067
|
if (filterLayer !== undefined) {
|
|
8061
8068
|
// temp = filterLayer;
|
|
@@ -8070,7 +8077,9 @@ class MenuWidget extends React.Component {
|
|
|
8070
8077
|
layer.includes('protected_areas')
|
|
8071
8078
|
) {
|
|
8072
8079
|
this.layers['pa_filter'].visible = false;
|
|
8073
|
-
this.layers[layer]
|
|
8080
|
+
if (this.layers[layer]) {
|
|
8081
|
+
this.layers[layer].visible = false;
|
|
8082
|
+
}
|
|
8074
8083
|
filterLayer = this.props.map.findLayerById('pa_filter');
|
|
8075
8084
|
if (filterLayer !== undefined) {
|
|
8076
8085
|
// temp = filterLayer;
|
|
@@ -8081,8 +8090,10 @@ class MenuWidget extends React.Component {
|
|
|
8081
8090
|
delete updatedFilteredLayers['pa_filter'];
|
|
8082
8091
|
}
|
|
8083
8092
|
this.props.mapLayersHandler(this.layers);
|
|
8084
|
-
|
|
8085
|
-
|
|
8093
|
+
if (this.props.hotspotDataHandler) {
|
|
8094
|
+
updatedHotspotData['filteredLayers'] = updatedFilteredLayers;
|
|
8095
|
+
this.props.hotspotDataHandler(updatedHotspotData);
|
|
8096
|
+
}
|
|
8086
8097
|
}
|
|
8087
8098
|
|
|
8088
8099
|
/**
|
|
@@ -234,6 +234,21 @@ const config = {
|
|
|
234
234
|
'/products/lclcc-hot-spots/json-files/all_geo_klc.json/@@download/file',
|
|
235
235
|
legendLinkUrl:
|
|
236
236
|
'https://geospatial.jrc.ec.europa.eu/geoserver/hotspots/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=',
|
|
237
|
+
hotspotWmsEndpoint: 'https://geospatial.jrc.ec.europa.eu/geoserver/hsm/wms',
|
|
238
|
+
hotspotWmsVersion: '1.1.0',
|
|
239
|
+
hotspotWmsSrs: 'EPSG:3857',
|
|
240
|
+
hotspotWmsLayerNames: {
|
|
241
|
+
lcc: {
|
|
242
|
+
a: 'hsm:lcc_a_pols',
|
|
243
|
+
b: 'hsm:lcc_b_pols',
|
|
244
|
+
},
|
|
245
|
+
lc: {
|
|
246
|
+
a: 'hsm:present_lc_a_pols',
|
|
247
|
+
b: 'hsm:present_lc_b_pols',
|
|
248
|
+
},
|
|
249
|
+
klc: 'hsm:cop_klc',
|
|
250
|
+
pa: 'hsm:protected_areas',
|
|
251
|
+
},
|
|
237
252
|
serviceUrl: 'https://geospatial.jrc.ec.europa.eu/geoserver/hotspots/wms',
|
|
238
253
|
positronCompositeThumbnail:
|
|
239
254
|
'https://gisco-services.ec.europa.eu/maps/wmts/OSMPositronComposite/EPSG3857/0/0/0.png',
|