@eeacms/volto-arcgis-block 0.1.383 → 0.1.384
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 +6 -0
- package/package.json +1 -1
- package/src/components/MapViewer/MenuWidget.jsx +48 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,16 @@ 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.384](https://github.com/eea/volto-arcgis-block/compare/0.1.383...0.1.384) - 1 September 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- (bug): fixed hardcoded value in fetch request byoc collection id's and service endpoints become are inyected into request programmatically now [Unai Bolivar - [`aea8135`](https://github.com/eea/volto-arcgis-block/commit/aea8135868d5fef944e27d31ad4e3188ce199ff6)]
|
|
7
12
|
### [0.1.383](https://github.com/eea/volto-arcgis-block/compare/0.1.382...0.1.383) - 29 August 2025
|
|
8
13
|
|
|
9
14
|
#### :hammer_and_wrench: Others
|
|
10
15
|
|
|
16
|
+
- Merge pull request #1007 from eea/develop [Unai Bolivar - [`4e2b9b6`](https://github.com/eea/volto-arcgis-block/commit/4e2b9b6e8fde0821243b917cde774dcf369bdc5d)]
|
|
11
17
|
- (bug): implemented CDSE extent mod to full extent button in activelayers tab of the menu widget [Unai Bolivar - [`e9fdd2f`](https://github.com/eea/volto-arcgis-block/commit/e9fdd2f066d7d9cb2d2036e9e780473c751e0937)]
|
|
12
18
|
### [0.1.382](https://github.com/eea/volto-arcgis-block/compare/0.1.381...0.1.382) - 28 August 2025
|
|
13
19
|
|
package/package.json
CHANGED
|
@@ -1697,6 +1697,7 @@ class MenuWidget extends React.Component {
|
|
|
1697
1697
|
dataset.DatasetId,
|
|
1698
1698
|
dataset.DatasetTitle,
|
|
1699
1699
|
dataset.ProductId,
|
|
1700
|
+
dataset.dataset_download_information,
|
|
1700
1701
|
),
|
|
1701
1702
|
);
|
|
1702
1703
|
index++;
|
|
@@ -1952,6 +1953,7 @@ class MenuWidget extends React.Component {
|
|
|
1952
1953
|
DatasetId,
|
|
1953
1954
|
DatasetTitle,
|
|
1954
1955
|
ProductId,
|
|
1956
|
+
dataset_download_information,
|
|
1955
1957
|
) {
|
|
1956
1958
|
//For Legend request
|
|
1957
1959
|
const legendRequest =
|
|
@@ -2027,6 +2029,7 @@ class MenuWidget extends React.Component {
|
|
|
2027
2029
|
ViewService: viewService,
|
|
2028
2030
|
StaticImageLegend: layer.StaticImageLegend,
|
|
2029
2031
|
LayerTitle: layer.Title,
|
|
2032
|
+
DatasetDownloadInformation: dataset_download_information || {},
|
|
2030
2033
|
customLayerParameters: {
|
|
2031
2034
|
SHOWLOGO: false,
|
|
2032
2035
|
},
|
|
@@ -2052,7 +2055,17 @@ class MenuWidget extends React.Component {
|
|
|
2052
2055
|
});
|
|
2053
2056
|
}
|
|
2054
2057
|
}
|
|
2055
|
-
|
|
2058
|
+
// const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
|
|
2059
|
+
// if (isCDSE) {
|
|
2060
|
+
// this.layers[
|
|
2061
|
+
// layer.LayerId + '_' + inheritedIndexLayer
|
|
2062
|
+
// ].datasetDownloadInformation = dataset_download_information || {};
|
|
2063
|
+
// this.layers[
|
|
2064
|
+
// layer.LayerId + '_' + inheritedIndexLayer
|
|
2065
|
+
// ].customLayerParameters = {
|
|
2066
|
+
// SHOWLOGO: false,
|
|
2067
|
+
// };
|
|
2068
|
+
// }
|
|
2056
2069
|
return (
|
|
2057
2070
|
<div
|
|
2058
2071
|
className="ccl-form-group map-menu-layer"
|
|
@@ -2936,10 +2949,15 @@ class MenuWidget extends React.Component {
|
|
|
2936
2949
|
try {
|
|
2937
2950
|
const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
|
|
2938
2951
|
if (isCDSE) {
|
|
2939
|
-
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
2952
|
+
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
2953
|
+
this.url,
|
|
2954
|
+
this.layers[elem.id],
|
|
2955
|
+
);
|
|
2940
2956
|
const extent = await this.createExtentFromCoordinates(cdseGeometry);
|
|
2941
|
-
this.view.goTo(
|
|
2942
|
-
|
|
2957
|
+
this.view.goTo({
|
|
2958
|
+
target: extent,
|
|
2959
|
+
zoom: 4,
|
|
2960
|
+
});
|
|
2943
2961
|
}
|
|
2944
2962
|
} catch (e) {}
|
|
2945
2963
|
// try {
|
|
@@ -3491,11 +3509,19 @@ class MenuWidget extends React.Component {
|
|
|
3491
3509
|
});
|
|
3492
3510
|
}
|
|
3493
3511
|
|
|
3494
|
-
async getCDSEWFSGeoCoordinates(url) {
|
|
3512
|
+
async getCDSEWFSGeoCoordinates(url, layer) {
|
|
3495
3513
|
if (!url) return {};
|
|
3496
3514
|
const match = /\/ogc\/(?:wmts|wms)\/([^/?]+)/i.exec(url);
|
|
3515
|
+
const datasetDownloadInformation =
|
|
3516
|
+
layer?.DatasetDownloadInformation ||
|
|
3517
|
+
layer?.DatasetDownloadInformation ||
|
|
3518
|
+
{};
|
|
3519
|
+
if (!datasetDownloadInformation) return {};
|
|
3520
|
+
const byocCollectionId =
|
|
3521
|
+
datasetDownloadInformation?.items[0].byoc_collection || null;
|
|
3522
|
+
if (!byocCollectionId) return {};
|
|
3497
3523
|
if (!match) return {};
|
|
3498
|
-
const fetchUrl = `https://sh.dataspace.copernicus.eu/ogc/wfs/${match[1]}?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=byoc
|
|
3524
|
+
const fetchUrl = `https://sh.dataspace.copernicus.eu/ogc/wfs/${match[1]}?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=byoc-${byocCollectionId}&COUNT=100&BBOX=-21039383,-22375217,21039383,22375217&OUTPUTFORMAT=application/json`;
|
|
3499
3525
|
try {
|
|
3500
3526
|
const res = await fetch(fetchUrl);
|
|
3501
3527
|
const data = await res.json();
|
|
@@ -3805,9 +3831,15 @@ class MenuWidget extends React.Component {
|
|
|
3805
3831
|
let isCDSE = this.url?.toLowerCase().includes('/ogc/') ? true : false;
|
|
3806
3832
|
let BBoxes = {};
|
|
3807
3833
|
if (isCDSE) {
|
|
3808
|
-
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
3834
|
+
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
3835
|
+
this.url,
|
|
3836
|
+
this.layers[elem.id],
|
|
3837
|
+
);
|
|
3809
3838
|
const extent = await this.createExtentFromCoordinates(cdseGeometry);
|
|
3810
|
-
this.view.goTo(
|
|
3839
|
+
this.view.goTo({
|
|
3840
|
+
target: extent,
|
|
3841
|
+
zoom: 4,
|
|
3842
|
+
});
|
|
3811
3843
|
return;
|
|
3812
3844
|
} else if (this.url?.toLowerCase().endsWith('mapserver')) {
|
|
3813
3845
|
BBoxes = await this.parseBBOXMAPSERVER(this.layers[elem.id]);
|
|
@@ -3883,9 +3915,15 @@ class MenuWidget extends React.Component {
|
|
|
3883
3915
|
let landCoverAndLandUseMapping = document.querySelector('#component_0');
|
|
3884
3916
|
let productIds = [];
|
|
3885
3917
|
if (isCDSE) {
|
|
3886
|
-
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
3918
|
+
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
3919
|
+
this.url,
|
|
3920
|
+
this.layers[elem.id],
|
|
3921
|
+
);
|
|
3887
3922
|
const extent = await this.createExtentFromCoordinates(cdseGeometry);
|
|
3888
|
-
this.view.goTo(
|
|
3923
|
+
this.view.goTo({
|
|
3924
|
+
target: extent,
|
|
3925
|
+
zoom: 4,
|
|
3926
|
+
});
|
|
3889
3927
|
return;
|
|
3890
3928
|
} else if (landCoverAndLandUseMapping) {
|
|
3891
3929
|
const productElements = landCoverAndLandUseMapping.querySelectorAll(
|