@eeacms/volto-arcgis-block 0.1.239 → 0.1.241

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,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.241](https://github.com/eea/volto-arcgis-block/compare/0.1.240...0.1.241) - 29 November 2023
8
+
9
+ ### [0.1.240](https://github.com/eea/volto-arcgis-block/compare/0.1.239...0.1.240) - 29 November 2023
10
+
7
11
  ### [0.1.239](https://github.com/eea/volto-arcgis-block/compare/0.1.238...0.1.239) - 23 November 2023
8
12
 
9
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.239",
3
+ "version": "0.1.241",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -68,7 +68,9 @@ class HotspotWidget extends React.Component {
68
68
  }
69
69
 
70
70
  getBBoxData = () => {
71
- const url = this.urls.klc_bbox;
71
+ const url =
72
+ window.location.href.replace(window.location.pathname.substring(3), '') +
73
+ this.props.urls.klc_bbox;
72
74
  return esriRequest(url, {
73
75
  responseType: 'json',
74
76
  }).then((response) => {
@@ -387,7 +389,10 @@ class HotspotWidget extends React.Component {
387
389
  }
388
390
 
389
391
  getLayerParameters() {
390
- fetch(this.urls.all_geo_klc)
392
+ const url =
393
+ window.location.href.replace(window.location.pathname.substring(3), '') +
394
+ this.props.urls.all_geo_klc;
395
+ fetch(url)
391
396
  .then((data) => {
392
397
  if (data.status === 200) {
393
398
  return data.json();
@@ -798,34 +803,10 @@ class HotspotWidget extends React.Component {
798
803
  );
799
804
  }
800
805
 
801
- //sortHotspotTabs = () => {
802
- // let activeLayersArray = Array.from(document.querySelectorAll('.active-layer'));
803
- // let divs = [
804
- // { id: 'all_present_lc', func: this.renderPresentLandCover, className: 'presentLandCoverContainer' },
805
- // { id: 'all_lcc', func: this.renderLandCoverChange, className: 'landCoverChangeContainer' }
806
- // ];
807
- //
808
- // divs.sort((a, b) => {
809
- // let indexA = activeLayersArray.findIndex(layer => layer.getAttribute('layer-id').includes(a.id));
810
- // let indexB = activeLayersArray.findIndex(layer => layer.getAttribute('layer-id').includes(b.id));
811
- // if (indexA === -1 || indexB === -1) return 0;
812
- // return indexA - indexB;
813
- // });
814
- //
815
- // return (
816
- // <div>
817
- // {divs.map(div => (
818
- // <div className={div.className}>
819
- // {div.func()}
820
- // </div>
821
- // ))}
822
- // </div>
823
- // );
824
- //}
825
-
826
806
  /**
827
- * This method is executed after the rener method is executed
807
+ * This method is executed after the render method is executed
828
808
  */
809
+
829
810
  async componentDidMount() {
830
811
  await this.getLayerParameters();
831
812
  await this.loader();
@@ -849,7 +830,6 @@ class HotspotWidget extends React.Component {
849
830
  if (prevProps.hotspotData !== this.props.hotspotData) {
850
831
  this.getKLCNames(this.dataJSONNames, this.state.selectedArea);
851
832
  this.disableButton();
852
- //this.layerModelInit();
853
833
  }
854
834
  }
855
835
  }
@@ -228,12 +228,12 @@ const config = {
228
228
  cop_klc:
229
229
  'https://geospatial.jrc.ec.europa.eu/geoserver/hotspots/wms?request=GetLegendGraphic&version=1.0.0&format=image/png&layer=cop_klc',
230
230
  klc_bbox:
231
- 'https://land.copernicus.eu/en/products/lclcc-hot-spots/json-files/klc_bbox.php/@@download/file',
231
+ '/products/lclcc-hot-spots/json-files/klc_bbox.php/@@download/file',
232
+ all_geo_klc:
233
+ '/products/lclcc-hot-spots/json-files/all_geo_klc.json/@@download/file',
232
234
  legendLinkUrl:
233
235
  'https://geospatial.jrc.ec.europa.eu/geoserver/hotspots/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=',
234
236
  serviceUrl: 'https://geospatial.jrc.ec.europa.eu/geoserver/hotspots/wms',
235
- all_geo_klc:
236
- 'https://land.copernicus.eu/en/products/lclcc-hot-spots/json-files/all_geo_klc.json/@@download/file',
237
237
  positronCompositeThumbnail:
238
238
  'https://gisco-services.ec.europa.eu/maps/wmts/OSMPositronComposite/EPSG3857/0/0/0.png',
239
239
  positronCompositeTemplate: