@eeacms/volto-arcgis-block 0.1.332 → 0.1.333

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.333](https://github.com/eea/volto-arcgis-block/compare/0.1.332...0.1.333) - 30 January 2025
8
+
7
9
  ### [0.1.332](https://github.com/eea/volto-arcgis-block/compare/0.1.331...0.1.332) - 21 January 2025
8
10
 
9
11
  ### [0.1.331](https://github.com/eea/volto-arcgis-block/compare/0.1.330...0.1.331) - 17 January 2025
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.332",
3
+ "version": "0.1.333",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -2846,20 +2846,31 @@ class MenuWidget extends React.Component {
2846
2846
  this.findCheckedDataset(elem);
2847
2847
  if (this.url?.toLowerCase().endsWith('mapserver')) {
2848
2848
  BBoxes = await this.parseBBOXMAPSERVER(this.layers[elem.id]);
2849
- } else if (this.url.toLowerCase().includes('wms')) {
2849
+ } else if (this.url?.toLowerCase().includes('wms')) {
2850
2850
  await this.getCapabilities(this.url, 'wms');
2851
2851
  BBoxes = this.parseBBOXWMS(this.xml);
2852
- } else if (this.url.toLowerCase().includes('wmts')) {
2852
+ } else if (this.url?.toLowerCase().includes('wmts')) {
2853
2853
  await this.getCapabilities(this.url, 'wmts');
2854
2854
  BBoxes = this.parseBBOXWMTS(this.xml);
2855
2855
  }
2856
- let myExtent = new Extent({
2857
- xmin: BBoxes['dataset'].xmin,
2858
- ymin: BBoxes['dataset'].ymin,
2859
- xmax: BBoxes['dataset'].xmax,
2860
- ymax: BBoxes['dataset'].ymax,
2861
- // spatialReference: 4326 // by default wkid 4326
2862
- });
2856
+ let myExtent;
2857
+ if (Object.values(BBoxes).length === 0) {
2858
+ myExtent = new Extent({
2859
+ xmin: -20037508.342789,
2860
+ ymin: -20037508.342789,
2861
+ xmax: 20037508.342789,
2862
+ ymax: 20037508.342789,
2863
+ spatialReference: 3857, // by default wkid 4326
2864
+ });
2865
+ } else {
2866
+ myExtent = new Extent({
2867
+ xmin: BBoxes['dataset'].xmin,
2868
+ ymin: BBoxes['dataset'].ymin,
2869
+ xmax: BBoxes['dataset'].xmax,
2870
+ ymax: BBoxes['dataset'].ymax,
2871
+ // spatialReference: 4326 // by default wkid 4326
2872
+ });
2873
+ }
2863
2874
  this.view.goTo(myExtent); //
2864
2875
  }
2865
2876