@eeacms/volto-arcgis-block 0.1.126 → 0.1.127

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,12 @@ 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.127](https://github.com/eea/volto-arcgis-block/compare/0.1.126...0.1.127) - 20 April 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - CLMS-1838 (fix): Area Widget runs improved NUTS service [ujbolivar - [`6cd1a91`](https://github.com/eea/volto-arcgis-block/commit/6cd1a91f2dbf176455827f271fff53ce629b6cd5)]
12
+ - CLMS-1838 (feat): improved NUTS service prepared the script for later [ujbolivar - [`0b0a88b`](https://github.com/eea/volto-arcgis-block/commit/0b0a88bc5e37518870db616f6f43deb52e40e96d)]
7
13
  ### [0.1.126](https://github.com/eea/volto-arcgis-block/compare/0.1.125...0.1.126) - 19 April 2023
8
14
 
9
15
  #### :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.126",
3
+ "version": "0.1.127",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -122,32 +122,37 @@ class AreaWidget extends React.Component {
122
122
  }
123
123
  }
124
124
  nuts0handler(e) {
125
- this.loadNutsService(e.target.value, 0);
125
+ this.loadNutsService(e.target.value, [0]);
126
126
  }
127
127
  nuts1handler(e) {
128
- this.loadNutsService(e.target.value, 1);
128
+ this.loadNutsService(e.target.value, [1, 2]);
129
129
  }
130
130
  nuts2handler(e) {
131
- this.loadNutsService(e.target.value, 2);
131
+ this.loadNutsService(e.target.value, [3, 4, 5]);
132
132
  }
133
133
  nuts3handler(e) {
134
- this.loadNutsService(e.target.value, 3);
134
+ this.loadNutsService(e.target.value, [6, 7, 8]);
135
135
  }
136
- loadNutsService(id, level) {
136
+ loadNutsService(id, levels) {
137
137
  this.clearWidget();
138
138
 
139
- var url =
140
- 'https://trial.discomap.eea.europa.eu/arcgis/rest/services/CLMS/NUTS_2021/MapServer/0';
141
- var layer = new FeatureLayer({
142
- url: url,
143
- id: id,
144
- outFields: ['*'],
145
- popupEnabled: false,
146
- definitionExpression: 'LEVL_CODE=' + level,
139
+ levels.forEach((level) => {
140
+ var url = `https://trial.discomap.eea.europa.eu/arcgis/rest/services/CLMS/NUTS_2021_Improved/MapServer/`;
141
+ var layer = new FeatureLayer({
142
+ id: id,
143
+ url: url,
144
+ layerId: level,
145
+ outFields: ['*'],
146
+ popupEnabled: false,
147
+ //definitionExpression: 'LEVL_CODE=' + level,
148
+ });
149
+
150
+ this.nutsGroupLayer.add(layer);
151
+
152
+ let index = this.getHighestIndex();
153
+
154
+ this.props.map.reorder(this.nutsGroupLayer, index + 1);
147
155
  });
148
- this.nutsGroupLayer.add(layer);
149
- let index = this.getHighestIndex();
150
- this.props.map.reorder(this.nutsGroupLayer, index + 1);
151
156
  }
152
157
  getHighestIndex() {
153
158
  let index = 0;
@@ -234,7 +239,7 @@ class AreaWidget extends React.Component {
234
239
  await this.loader();
235
240
  this.nutsGroupLayer = new GroupLayer({
236
241
  title: 'nuts',
237
- opacity: 0.5,
242
+ //opacity: 0.5,
238
243
  });
239
244
  this.props.map.add(this.nutsGroupLayer);
240
245
  this.props.view.on('click', (event) => {