@eeacms/volto-arcgis-block 0.1.440 → 0.1.442
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 +4 -0
- package/package.json +1 -1
- package/src/components/MapViewer/MenuWidget.jsx +119 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ 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.442](https://github.com/eea/volto-arcgis-block/compare/0.1.441...0.1.442) - 9 April 2026
|
|
8
|
+
|
|
9
|
+
### [0.1.441](https://github.com/eea/volto-arcgis-block/compare/0.1.440...0.1.441) - 7 April 2026
|
|
10
|
+
|
|
7
11
|
### [0.1.440](https://github.com/eea/volto-arcgis-block/compare/0.1.439...0.1.440) - 31 March 2026
|
|
8
12
|
|
|
9
13
|
### [0.1.439](https://github.com/eea/volto-arcgis-block/compare/0.1.438...0.1.439) - 23 March 2026
|
package/package.json
CHANGED
|
@@ -4428,6 +4428,57 @@ class MenuWidget extends React.Component {
|
|
|
4428
4428
|
// }, 2000);
|
|
4429
4429
|
}
|
|
4430
4430
|
}
|
|
4431
|
+
try {
|
|
4432
|
+
const isCDSE =
|
|
4433
|
+
!!this.url &&
|
|
4434
|
+
['/ogc/', '/cdse/'].some((s) => this.url.toLowerCase().includes(s));
|
|
4435
|
+
if (isCDSE) {
|
|
4436
|
+
const d =
|
|
4437
|
+
this.layers[elem.id]?.DatasetDownloadInformation ||
|
|
4438
|
+
this.layers[elem.id]?.datasetDownloadInformation ||
|
|
4439
|
+
{};
|
|
4440
|
+
const byoc =
|
|
4441
|
+
d && d.items && d.items[0] ? d.items[0].byoc_collection : null;
|
|
4442
|
+
if (byoc && this.props.fetchCatalogApiDates) {
|
|
4443
|
+
let payload =
|
|
4444
|
+
this.props.catalogapi &&
|
|
4445
|
+
this.props.catalogapi.byoc &&
|
|
4446
|
+
this.props.catalogapi.byoc[byoc]
|
|
4447
|
+
? this.props.catalogapi.byoc[byoc].data
|
|
4448
|
+
: null;
|
|
4449
|
+
if (!payload) {
|
|
4450
|
+
payload = await this.props.fetchCatalogApiDates(byoc, false);
|
|
4451
|
+
}
|
|
4452
|
+
if (payload) {
|
|
4453
|
+
if (
|
|
4454
|
+
this.layers[elem.id].ViewService.toLowerCase().includes('wmts')
|
|
4455
|
+
) {
|
|
4456
|
+
this.layers[elem.id] = new WMTSLayer({
|
|
4457
|
+
url: this.layers[elem.id].url,
|
|
4458
|
+
spatialReference: this.layers[elem.id].spatialReference,
|
|
4459
|
+
title: this.layers[elem.id].title,
|
|
4460
|
+
_wmtsTitle: this.layers[elem.id]._wmtsTitle,
|
|
4461
|
+
activeLayer: this.layers[elem.id].activeLayer,
|
|
4462
|
+
isTimeSeries: this.layers[elem.id].isTimeSeries,
|
|
4463
|
+
fields: this.layers[elem.id].fields,
|
|
4464
|
+
DatasetId: this.layers[elem.id].DatasetId,
|
|
4465
|
+
DatasetTitle: this.layers[elem.id].DatasetTitle,
|
|
4466
|
+
ProductId: this.layers[elem.id].ProductId,
|
|
4467
|
+
ViewService: this.layers[elem.id].ViewService,
|
|
4468
|
+
StaticImageLegend: this.layers[elem.id].StaticImageLegend,
|
|
4469
|
+
LayerTitle: this.layers[elem.id].LayerTitle,
|
|
4470
|
+
DatasetDownloadInformation: this.layers[elem.id]
|
|
4471
|
+
.DatasetDownloadInformation,
|
|
4472
|
+
customLayerParameters: {
|
|
4473
|
+
SHOWLOGO: false,
|
|
4474
|
+
TIME: payload.dates[payload.dates.length - 1] || '',
|
|
4475
|
+
},
|
|
4476
|
+
});
|
|
4477
|
+
}
|
|
4478
|
+
}
|
|
4479
|
+
}
|
|
4480
|
+
}
|
|
4481
|
+
} catch (e) {}
|
|
4431
4482
|
if (
|
|
4432
4483
|
this.layers[elem.id].DatasetId === '65f8eded11d94a1ba5540ceecaddd4e6' ||
|
|
4433
4484
|
this.layers[elem.id].DatasetId === '40e056d02eed4c1fb2040cf0f06823df'
|
|
@@ -5857,6 +5908,53 @@ class MenuWidget extends React.Component {
|
|
|
5857
5908
|
const serviceLayer = this.state.wmsUserServiceLayers.find(
|
|
5858
5909
|
(layer) => layer.LayerId === elem.id,
|
|
5859
5910
|
);
|
|
5911
|
+
const resolveLayerExtent = async () => {
|
|
5912
|
+
const activeLayer = this.layers[elem.id] || serviceLayer;
|
|
5913
|
+
if (!activeLayer) {
|
|
5914
|
+
return null;
|
|
5915
|
+
}
|
|
5916
|
+
let targetExtent =
|
|
5917
|
+
activeLayer.fullExtent ||
|
|
5918
|
+
(activeLayer.fullExtents && activeLayer.fullExtents[0]
|
|
5919
|
+
? activeLayer.fullExtents[0]
|
|
5920
|
+
: null);
|
|
5921
|
+
if (!targetExtent && typeof activeLayer.queryExtent === 'function') {
|
|
5922
|
+
try {
|
|
5923
|
+
const queryResult = await activeLayer.queryExtent();
|
|
5924
|
+
targetExtent = queryResult?.extent || null;
|
|
5925
|
+
} catch (error) {}
|
|
5926
|
+
}
|
|
5927
|
+
if (!targetExtent) {
|
|
5928
|
+
return null;
|
|
5929
|
+
}
|
|
5930
|
+
if (!(targetExtent instanceof Extent)) {
|
|
5931
|
+
targetExtent = new Extent({
|
|
5932
|
+
xmin: targetExtent.xmin,
|
|
5933
|
+
ymin: targetExtent.ymin,
|
|
5934
|
+
xmax: targetExtent.xmax,
|
|
5935
|
+
ymax: targetExtent.ymax,
|
|
5936
|
+
spatialReference:
|
|
5937
|
+
targetExtent.spatialReference || this.view?.spatialReference,
|
|
5938
|
+
});
|
|
5939
|
+
}
|
|
5940
|
+
if (
|
|
5941
|
+
targetExtent?.spatialReference &&
|
|
5942
|
+
this.view?.spatialReference &&
|
|
5943
|
+
targetExtent.spatialReference.wkid !== this.view.spatialReference.wkid
|
|
5944
|
+
) {
|
|
5945
|
+
try {
|
|
5946
|
+
await projection.load();
|
|
5947
|
+
const projectedExtent = projection.project(
|
|
5948
|
+
targetExtent,
|
|
5949
|
+
this.view.spatialReference,
|
|
5950
|
+
);
|
|
5951
|
+
if (projectedExtent) {
|
|
5952
|
+
targetExtent = projectedExtent;
|
|
5953
|
+
}
|
|
5954
|
+
} catch (error) {}
|
|
5955
|
+
}
|
|
5956
|
+
return targetExtent;
|
|
5957
|
+
};
|
|
5860
5958
|
|
|
5861
5959
|
if (!serviceLayer) {
|
|
5862
5960
|
this.findCheckedDataset(elem);
|
|
@@ -5864,6 +5962,27 @@ class MenuWidget extends React.Component {
|
|
|
5864
5962
|
this.productId = null;
|
|
5865
5963
|
this.url = serviceLayer.ViewService;
|
|
5866
5964
|
}
|
|
5965
|
+
const isUploadedServiceLayer =
|
|
5966
|
+
!!serviceLayer &&
|
|
5967
|
+
(this.layers[elem.id]?.type === 'feature' ||
|
|
5968
|
+
serviceLayer.type === 'feature');
|
|
5969
|
+
if (isUploadedServiceLayer) {
|
|
5970
|
+
const targetExtent = await resolveLayerExtent();
|
|
5971
|
+
if (targetExtent) {
|
|
5972
|
+
this.view.goTo(targetExtent);
|
|
5973
|
+
this.url = null;
|
|
5974
|
+
return;
|
|
5975
|
+
}
|
|
5976
|
+
if (
|
|
5977
|
+
this.uploadedGraphics &&
|
|
5978
|
+
this.uploadedGraphics[elem.id] &&
|
|
5979
|
+
this.uploadedGraphics[elem.id].length > 0
|
|
5980
|
+
) {
|
|
5981
|
+
this.view.goTo(this.uploadedGraphics[elem.id]);
|
|
5982
|
+
this.url = null;
|
|
5983
|
+
return;
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5867
5986
|
let BBoxes = {};
|
|
5868
5987
|
let firstLayer;
|
|
5869
5988
|
let myExtent = null;
|