@eeacms/volto-arcgis-block 0.1.382 → 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 +12 -0
- package/package.json +1 -1
- package/src/components/MapViewer/MenuWidget.jsx +57 -16
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,22 @@ 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)]
|
|
12
|
+
### [0.1.383](https://github.com/eea/volto-arcgis-block/compare/0.1.382...0.1.383) - 29 August 2025
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- Merge pull request #1007 from eea/develop [Unai Bolivar - [`4e2b9b6`](https://github.com/eea/volto-arcgis-block/commit/4e2b9b6e8fde0821243b917cde774dcf369bdc5d)]
|
|
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)]
|
|
7
18
|
### [0.1.382](https://github.com/eea/volto-arcgis-block/compare/0.1.381...0.1.382) - 28 August 2025
|
|
8
19
|
|
|
9
20
|
#### :hammer_and_wrench: Others
|
|
10
21
|
|
|
22
|
+
- Merge pull request #1005 from eea/develop [Unai Bolivar - [`820e1bb`](https://github.com/eea/volto-arcgis-block/commit/820e1bb0d930b5388cb088d7d58bbc4bf582efa5)]
|
|
11
23
|
- (feat): clean extent for CDSE working [Unai Bolivar - [`676f76f`](https://github.com/eea/volto-arcgis-block/commit/676f76fd3b0a3bba9d451ea513ee95f47c1d4cbe)]
|
|
12
24
|
- (feat): extent is working for WMTS requests [Unai Bolivar - [`96f1fff`](https://github.com/eea/volto-arcgis-block/commit/96f1fffd898b238da5cece8b83fbd9489b240d68)]
|
|
13
25
|
- (feat): using wfs data to determine graphic position in map viewer. [Unai Bolivar - [`2e4e923`](https://github.com/eea/volto-arcgis-block/commit/2e4e923d6e6e8a8e0c39cbe9e2585b9f5ff550cb)]
|
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]);
|
|
@@ -3866,6 +3898,8 @@ class MenuWidget extends React.Component {
|
|
|
3866
3898
|
}
|
|
3867
3899
|
|
|
3868
3900
|
async fullExtent(elem) {
|
|
3901
|
+
this.url = this.layers[elem.id]?.url;
|
|
3902
|
+
const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
|
|
3869
3903
|
const serviceLayer = this.state.wmsUserServiceLayers.find(
|
|
3870
3904
|
(layer) => layer.LayerId === elem.id,
|
|
3871
3905
|
);
|
|
@@ -3880,7 +3914,18 @@ class MenuWidget extends React.Component {
|
|
|
3880
3914
|
let firstLayer;
|
|
3881
3915
|
let landCoverAndLandUseMapping = document.querySelector('#component_0');
|
|
3882
3916
|
let productIds = [];
|
|
3883
|
-
if (
|
|
3917
|
+
if (isCDSE) {
|
|
3918
|
+
const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
|
|
3919
|
+
this.url,
|
|
3920
|
+
this.layers[elem.id],
|
|
3921
|
+
);
|
|
3922
|
+
const extent = await this.createExtentFromCoordinates(cdseGeometry);
|
|
3923
|
+
this.view.goTo({
|
|
3924
|
+
target: extent,
|
|
3925
|
+
zoom: 4,
|
|
3926
|
+
});
|
|
3927
|
+
return;
|
|
3928
|
+
} else if (landCoverAndLandUseMapping) {
|
|
3884
3929
|
const productElements = landCoverAndLandUseMapping.querySelectorAll(
|
|
3885
3930
|
'.map-menu-product-dropdown',
|
|
3886
3931
|
);
|
|
@@ -3890,9 +3935,7 @@ class MenuWidget extends React.Component {
|
|
|
3890
3935
|
productIds.push(productId);
|
|
3891
3936
|
}
|
|
3892
3937
|
});
|
|
3893
|
-
}
|
|
3894
|
-
|
|
3895
|
-
if (this.productId?.includes('333e4100b79045daa0ff16466ac83b7f')) {
|
|
3938
|
+
} else if (this.productId?.includes('333e4100b79045daa0ff16466ac83b7f')) {
|
|
3896
3939
|
//global dynamic landCover
|
|
3897
3940
|
this.findDatasetBoundingBox(elem);
|
|
3898
3941
|
|
|
@@ -3920,10 +3963,7 @@ class MenuWidget extends React.Component {
|
|
|
3920
3963
|
BBoxes = await this.parseBBOXMAPSERVER(this.layers[elem.id]);
|
|
3921
3964
|
} else if (this.url?.toLowerCase().includes('wms') || serviceLayer) {
|
|
3922
3965
|
await this.getCapabilities(this.url, 'wms');
|
|
3923
|
-
|
|
3924
|
-
} else {
|
|
3925
|
-
BBoxes = this.parseBBOXWMS(this.xml);
|
|
3926
|
-
}
|
|
3966
|
+
BBoxes = this.parseBBOXWMS(this.xml);
|
|
3927
3967
|
} else if (this.url?.toLowerCase().includes('wmts')) {
|
|
3928
3968
|
await this.getCapabilities(this.url, 'wmts');
|
|
3929
3969
|
BBoxes = this.parseBBOXWMTS(this.xml);
|
|
@@ -4041,6 +4081,7 @@ class MenuWidget extends React.Component {
|
|
|
4041
4081
|
});
|
|
4042
4082
|
this.view.goTo(myExtent); //
|
|
4043
4083
|
}
|
|
4084
|
+
this.url = null;
|
|
4044
4085
|
}
|
|
4045
4086
|
/**
|
|
4046
4087
|
* Method to show Active Layers of the map
|