@eeacms/volto-arcgis-block 0.1.384 → 0.1.386

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,17 @@ 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.386](https://github.com/eea/volto-arcgis-block/compare/0.1.385...0.1.386) - 12 September 2025
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - (bug): CDSE datasets can be added to the cart now [Unai Bolivar - [`62bd4fa`](https://github.com/eea/volto-arcgis-block/commit/62bd4fa40761f488784fa10629cba17c1f0c382e)]
12
+ - (bug): refactor of checkExtent for datasets requested from CDSE [Unai Bolivar - [`a759432`](https://github.com/eea/volto-arcgis-block/commit/a759432b0cfd36eb328d92aa0a6affd3a709996c)]
13
+ ### [0.1.385](https://github.com/eea/volto-arcgis-block/compare/0.1.384...0.1.385) - 4 September 2025
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - Merge pull request #1011 from eea/develop [Unai Bolivar - [`7703520`](https://github.com/eea/volto-arcgis-block/commit/7703520bfdfafec53c5a9745f25e5e853f6a1725)]
7
18
  ### [0.1.384](https://github.com/eea/volto-arcgis-block/compare/0.1.383...0.1.384) - 1 September 2025
8
19
 
9
20
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.384",
3
+ "version": "0.1.386",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -100,6 +100,11 @@ export const AddCartItem = ({
100
100
  let isMapServer = dataset?.ViewService?.toLowerCase().endsWith('/mapserver')
101
101
  ? true
102
102
  : false;
103
+ const isCDSE =
104
+ !!dataset?.ViewService &&
105
+ ['/ogc/', '/cdse/'].some((s) =>
106
+ dataset.ViewService.toLowerCase().includes(s),
107
+ );
103
108
  if (check === 'area' || fileUpload || check === 'coordinates') {
104
109
  areaExtent = new Extent({
105
110
  xmin: Math.min(areaData?.end?.x, areaData?.origin?.x),
@@ -140,7 +145,21 @@ export const AddCartItem = ({
140
145
  ymin: props.layers[id].fullExtents[0].ymin,
141
146
  xmax: props.layers[id].fullExtents[0].xmax,
142
147
  ymax: props.layers[id].fullExtents[0].ymax,
148
+ spatialReference:
149
+ props.layers[id].fullExtents[0].spatialReference ||
150
+ mapViewer?.view?.spatialReference,
143
151
  });
152
+ if (isCDSE) {
153
+ try {
154
+ const projected = projection.project(
155
+ layerExtent,
156
+ mapViewer.view.spatialReference,
157
+ );
158
+ if (projected) {
159
+ layerExtent = projected;
160
+ }
161
+ } catch (e) {}
162
+ }
144
163
  } else {
145
164
  layerExtent = new Extent({
146
165
  xmin: -20037508.342789,
@@ -2947,7 +2966,10 @@ class MenuWidget extends React.Component {
2947
2966
  if (!userService) this.checkForHotspots(elem, productContainerId);
2948
2967
  // Auto-fit extent once for OGC WMS layers on manual toggle
2949
2968
  try {
2950
- const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
2969
+ // const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
2970
+ const isCDSE =
2971
+ !!this.url &&
2972
+ ['/ogc/', '/cdse/'].some((s) => this.url.toLowerCase().includes(s));
2951
2973
  if (isCDSE) {
2952
2974
  const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
2953
2975
  this.url,
@@ -3828,7 +3850,10 @@ class MenuWidget extends React.Component {
3828
3850
  } else {
3829
3851
  this.url = serviceLayer.ViewService;
3830
3852
  }
3831
- let isCDSE = this.url?.toLowerCase().includes('/ogc/') ? true : false;
3853
+ // const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
3854
+ const isCDSE =
3855
+ !!this.url &&
3856
+ ['/ogc/', '/cdse/'].some((s) => this.url.toLowerCase().includes(s));
3832
3857
  let BBoxes = {};
3833
3858
  if (isCDSE) {
3834
3859
  const cdseGeometry = await this.getCDSEWFSGeoCoordinates(
@@ -3899,7 +3924,10 @@ class MenuWidget extends React.Component {
3899
3924
 
3900
3925
  async fullExtent(elem) {
3901
3926
  this.url = this.layers[elem.id]?.url;
3902
- const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
3927
+ // const isCDSE = !!this.url && this.url.toLowerCase().includes('/ogc/');
3928
+ const isCDSE =
3929
+ !!this.url &&
3930
+ ['/ogc/', '/cdse/'].some((s) => this.url.toLowerCase().includes(s));
3903
3931
  const serviceLayer = this.state.wmsUserServiceLayers.find(
3904
3932
  (layer) => layer.LayerId === elem.id,
3905
3933
  );