@eeacms/volto-arcgis-block 0.1.385 → 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,8 +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)]
7
13
  ### [0.1.385](https://github.com/eea/volto-arcgis-block/compare/0.1.384...0.1.385) - 4 September 2025
8
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)]
9
18
  ### [0.1.384](https://github.com/eea/volto-arcgis-block/compare/0.1.383...0.1.384) - 1 September 2025
10
19
 
11
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.385",
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,