@eeacms/volto-arcgis-block 0.1.439 → 0.1.440

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,11 +4,10 @@ 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.439](https://github.com/eea/volto-arcgis-block/compare/0.1.438...0.1.439) - 23 March 2026
7
+ ### [0.1.440](https://github.com/eea/volto-arcgis-block/compare/0.1.439...0.1.440) - 31 March 2026
8
8
 
9
- #### :hammer_and_wrench: Others
9
+ ### [0.1.439](https://github.com/eea/volto-arcgis-block/compare/0.1.438...0.1.439) - 23 March 2026
10
10
 
11
- - (feat): Set 3D view as the default by modifying the URL [Unai Bolivar - [`1221b92`](https://github.com/eea/volto-arcgis-block/commit/1221b92b36f86e561de6912681df657f5b02bc4b)]
12
11
  ### [0.1.438](https://github.com/eea/volto-arcgis-block/compare/0.1.437...0.1.438) - 12 March 2026
13
12
 
14
13
  #### :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.439",
3
+ "version": "0.1.440",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -5426,8 +5426,10 @@ class MenuWidget extends React.Component {
5426
5426
  }
5427
5427
  const nameNode = child.querySelector('Name');
5428
5428
  const key =
5429
- nameNode && typeof nameNode.innerText === 'string'
5430
- ? nameNode.innerText
5429
+ nameNode &&
5430
+ typeof nameNode.textContent === 'string' &&
5431
+ nameNode.textContent
5432
+ ? nameNode.textContent.trim()
5431
5433
  : '';
5432
5434
  if (!layerGeographicNode || !key) continue;
5433
5435
  const westNode = layerGeographicNode.querySelector('westBoundLongitude');
@@ -5435,10 +5437,10 @@ class MenuWidget extends React.Component {
5435
5437
  const eastNode = layerGeographicNode.querySelector('eastBoundLongitude');
5436
5438
  const northNode = layerGeographicNode.querySelector('northBoundLatitude');
5437
5439
  if (!westNode || !southNode || !eastNode || !northNode) continue;
5438
- const xmin = Number(westNode.innerText);
5439
- const ymin = Number(southNode.innerText);
5440
- const xmax = Number(eastNode.innerText);
5441
- const ymax = Number(northNode.innerText);
5440
+ const xmin = Number(westNode.textContent);
5441
+ const ymin = Number(southNode.textContent);
5442
+ const xmax = Number(eastNode.textContent);
5443
+ const ymax = Number(northNode.textContent);
5442
5444
  if (
5443
5445
  !isFinite(xmin) ||
5444
5446
  !isFinite(ymin) ||
@@ -5990,14 +5992,27 @@ class MenuWidget extends React.Component {
5990
5992
  },
5991
5993
  };
5992
5994
  }
5993
- } else if (this.url?.toLowerCase().endsWith('mapserver')) {
5994
- BBoxes = await this.parseBBOXMAPSERVER(this.layers[elem.id]);
5995
- } else if (this.url?.toLowerCase().includes('wms')) {
5996
- await this.getCapabilities(this.url, 'wms');
5997
- BBoxes = this.parseBBOXWMS(this.xml);
5998
- } else if (this.url?.toLowerCase().includes('wmts')) {
5999
- await this.getCapabilities(this.url, 'wmts');
6000
- BBoxes = this.parseBBOXWMTS(this.xml);
5995
+ }
5996
+ if (
5997
+ (!BBoxes || Object.keys(BBoxes).length === 0) &&
5998
+ this.uploadedGraphics &&
5999
+ this.uploadedGraphics[elem.id] &&
6000
+ this.uploadedGraphics[elem.id].length > 0
6001
+ ) {
6002
+ this.view.goTo(this.uploadedGraphics[elem.id]);
6003
+ this.url = null;
6004
+ return;
6005
+ }
6006
+ if (!BBoxes || Object.keys(BBoxes).length === 0) {
6007
+ if (this.url?.toLowerCase().endsWith('mapserver')) {
6008
+ BBoxes = await this.parseBBOXMAPSERVER(this.layers[elem.id]);
6009
+ } else if (this.url?.toLowerCase().includes('wms')) {
6010
+ await this.getCapabilities(this.url, 'wms');
6011
+ BBoxes = this.parseBBOXWMS(this.xml);
6012
+ } else if (this.url?.toLowerCase().includes('wmts')) {
6013
+ await this.getCapabilities(this.url, 'wmts');
6014
+ BBoxes = this.parseBBOXWMTS(this.xml);
6015
+ }
6001
6016
  }
6002
6017
  if (
6003
6018
  BBoxes &&
@@ -6094,9 +6109,17 @@ class MenuWidget extends React.Component {
6094
6109
  ) {
6095
6110
  firstLayer = BBoxes['all_present_lc_a_pol'];
6096
6111
  } else if (serviceLayer) {
6097
- firstLayer = BBoxes['dataset'];
6112
+ firstLayer = BBoxes['dataset'] || BBoxes[Object.keys(BBoxes)[0]];
6098
6113
  } else {
6099
- firstLayer = BBoxes[elem.attributes.layerid.value];
6114
+ const layerId = elem?.attributes?.layerid?.value;
6115
+ firstLayer =
6116
+ (layerId && BBoxes[layerId]) ||
6117
+ BBoxes['dataset'] ||
6118
+ BBoxes[Object.keys(BBoxes)[0]];
6119
+ }
6120
+ if (!firstLayer) {
6121
+ this.url = null;
6122
+ return;
6100
6123
  }
6101
6124
  myExtent = new Extent({
6102
6125
  xmin: firstLayer.xmin,