@eeacms/volto-arcgis-block 0.1.266 → 0.1.267

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,10 +4,16 @@ 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.267](https://github.com/eea/volto-arcgis-block/compare/0.1.266...0.1.267) - 20 March 2024
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - CLMS-BOOKMARK-MARKER (bug): marker is erased and widget closed if layers in menu widget are un checked [Unai Bolivar - [`0fb3ac9`](https://github.com/eea/volto-arcgis-block/commit/0fb3ac9e7c553b59b2af7fb5b2b0b213c8fa0885)]
7
12
  ### [0.1.266](https://github.com/eea/volto-arcgis-block/compare/0.1.265...0.1.266) - 19 March 2024
8
13
 
9
14
  #### :hammer_and_wrench: Others
10
15
 
16
+ - Merge pull request #732 from eea/develop [Unai Bolivar - [`5619658`](https://github.com/eea/volto-arcgis-block/commit/5619658a6e61305994ec50c7ead5bedf2d494d43)]
11
17
  - CLMS-2383-3050 (chore): added FAQ hyperlink [Unai Bolivar - [`445af32`](https://github.com/eea/volto-arcgis-block/commit/445af32d2a7c4326f3369657378bbe97b1cb4c2f)]
12
18
  - CLMS-2383-3050 (chore): fixed lint error 2 [Unai Bolivar - [`93114ff`](https://github.com/eea/volto-arcgis-block/commit/93114ff28cc2ad1414a079e09489a0c732e8d8ff)]
13
19
  - CLMS-2383-3050 (chore): fixed lint error [Unai Bolivar - [`0b53f2e`](https://github.com/eea/volto-arcgis-block/commit/0b53f2e4237aa111e667978c2f97459e1ba7c468)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.266",
3
+ "version": "0.1.267",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -223,6 +223,7 @@ class AreaWidget extends React.Component {
223
223
  }
224
224
 
225
225
  loadCountriesService(id) {
226
+ //debugger;
226
227
  document.querySelector('.esri-attribution__powered-by').style.display =
227
228
  'flex';
228
229
  var layer = new FeatureLayer({
@@ -388,7 +389,7 @@ class AreaWidget extends React.Component {
388
389
  }
389
390
  })
390
391
  .catch((error) => {
391
- //console.error('From generateFeatureCollection function', error);
392
+ //console.error('Failed to generate feature collection:', error);
392
393
  });
393
394
  }
394
395
 
@@ -404,6 +405,7 @@ class AreaWidget extends React.Component {
404
405
  });
405
406
  sourceGraphics = sourceGraphics.concat(graphics);
406
407
  const featureLayer = new FeatureLayer({
408
+ // id: 9,
407
409
  objectIdField: 'FID',
408
410
  source: graphics,
409
411
  legendEnabled: false,
@@ -411,6 +413,9 @@ class AreaWidget extends React.Component {
411
413
  fields: layer.layerDefinition.fields.map((field) => {
412
414
  return Field.fromJSON(field);
413
415
  }),
416
+ // layerId: 9,
417
+ // outFields: ['*'],
418
+ // popupEnabled: false,
414
419
  });
415
420
  return featureLayer;
416
421
  });
@@ -566,16 +571,22 @@ class AreaWidget extends React.Component {
566
571
  removeNutsLayers() {
567
572
  //find all the radio buttons
568
573
  let radioButtons = document.querySelectorAll('fieldset.ccl-fieldset');
569
-
570
- // Isolate the the checked radio button
571
- let selectedRadioButton = Array.from(radioButtons).find(
572
- (radioButton) => radioButton.querySelector('input').checked,
574
+ let rectangleRadioButton = document.querySelector(
575
+ '#download_area_select_rectangle',
573
576
  );
577
+ // Isolate the the checked radio button
578
+ let selectedRadioButton = Array.from(radioButtons).find((radioButton) => {
579
+ let input = radioButton.querySelector('input');
580
+ return input && input.type === 'radio' && input.checked;
581
+ });
574
582
 
575
583
  //Uncheck the selected radio button
576
584
  if (selectedRadioButton) {
577
585
  selectedRadioButton.querySelector('input').checked = false;
578
586
  }
587
+ if (rectangleRadioButton.checked) {
588
+ rectangleRadioButton.checked = false;
589
+ }
579
590
 
580
591
  //Remove the layers in this.nutsGroupLayer from the map
581
592
  //this.nutsGroupLayer.removeAll();
@@ -3131,6 +3131,16 @@ class MenuWidget extends React.Component {
3131
3131
  }
3132
3132
  });
3133
3133
  if (layers.length === 0 && document.querySelector('.info-container')) {
3134
+ if (
3135
+ this.props.view.graphics.items.find((a) => {
3136
+ return a.attributes ? a.attributes.id === 'pixel-info' : false;
3137
+ })
3138
+ ) {
3139
+ let marker = this.props.view.graphics.items.find((a) => {
3140
+ return a.attributes && a.attributes.id === 'pixel-info';
3141
+ });
3142
+ this.props.view.graphics.remove(marker);
3143
+ }
3134
3144
  if (
3135
3145
  this.props.mapViewer.activeWidget?.container.current.className ===
3136
3146
  'info-container esri-component'