@eeacms/volto-arcgis-block 0.1.410 → 0.1.411

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,8 @@ 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.411](https://github.com/eea/volto-arcgis-block/compare/0.1.410...0.1.411) - 26 November 2025
8
+
7
9
  ### [0.1.410](https://github.com/eea/volto-arcgis-block/compare/0.1.409...0.1.410) - 25 November 2025
8
10
 
9
11
  #### :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.410",
3
+ "version": "0.1.411",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -352,7 +352,7 @@ class BookmarkWidget extends React.Component {
352
352
  ? bookmarks.selectedHotspotFilter
353
353
  : null,
354
354
  };
355
- let filename = 'bookmark_' + selectedBookmark.items.name;
355
+ let filename = 'bookmark_' + selectedBookmark.items?.name;
356
356
  const blob = new Blob(
357
357
  [JSON.stringify(selectedBookmark)],
358
358
  {
@@ -1198,22 +1198,28 @@ class BookmarkWidget extends React.Component {
1198
1198
  );
1199
1199
  } catch (e) {}
1200
1200
  this.loadBookmarksToWidget();
1201
- this.Bookmarks.bookmarks = this.sessionBookmarks.map((bm) => {
1202
- if (bm.extent) {
1203
- const { extent, ...rest } = bm;
1204
- let geometry;
1205
- if (extent && typeof extent === 'object') {
1206
- geometry = extent.type ? extent : new Extent(extent);
1201
+ if (this.Bookmarks && this.Bookmarks.bookmarks) {
1202
+ const mapped = this.sessionBookmarks.map((bm) => {
1203
+ if (bm && bm.extent) {
1204
+ const { extent, ...rest } = bm;
1205
+ let geometry;
1206
+ if (extent && typeof extent === 'object') {
1207
+ geometry = extent.type ? extent : new Extent(extent);
1208
+ }
1209
+ return {
1210
+ ...rest,
1211
+ viewpoint: { targetGeometry: geometry },
1212
+ };
1207
1213
  }
1208
- return {
1209
- ...rest,
1210
- viewpoint: {
1211
- targetGeometry: geometry,
1212
- },
1213
- };
1214
- }
1215
- return bm;
1216
- });
1214
+ return bm;
1215
+ });
1216
+ this.Bookmarks.bookmarks.removeAll();
1217
+ mapped.forEach((item) => this.Bookmarks.bookmarks.add(item));
1218
+ this.sessionBookmarks = [];
1219
+ this.Bookmarks.bookmarks.items.forEach((bookmark) => {
1220
+ this.sessionBookmarks.push(bookmark);
1221
+ });
1222
+ }
1217
1223
  };
1218
1224
  reader.readAsText(file);
1219
1225
  }