@eeacms/volto-arcgis-block 0.1.47 → 0.1.50
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 +30 -0
- package/package.json +1 -1
- package/src/components/MapViewer/InfoWidget.jsx +13 -3
- package/src/components/MapViewer/MapViewer.jsx +7 -1
- package/src/components/MapViewer/MenuWidget.jsx +2 -2
- package/src/components/MapViewer/config.js +2 -2
- package/src/components/UseCasesMapViewer/UseCasesMapViewer.jsx +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,13 +4,43 @@ 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.50](https://github.com/eea/volto-arcgis-block/compare/0.1.49...0.1.50)
|
|
8
|
+
|
|
9
|
+
- Bugs n improvements [`#162`](https://github.com/eea/volto-arcgis-block/pull/162)
|
|
10
|
+
- Develop [`#161`](https://github.com/eea/volto-arcgis-block/pull/161)
|
|
11
|
+
- Map status layer groups [`5fc261f`](https://github.com/eea/volto-arcgis-block/commit/5fc261fb7f06129444392e37e2253367169fd525)
|
|
12
|
+
- Handling level bug fix [`dc953e2`](https://github.com/eea/volto-arcgis-block/commit/dc953e25c4aa35f624d14f89a671c23799ebbcaa)
|
|
13
|
+
- Layer info messages [`39f4d68`](https://github.com/eea/volto-arcgis-block/commit/39f4d688d8b770982ff28d5a6bb19bb64ee35367)
|
|
14
|
+
- Map initial coordinates [`f8d14e9`](https://github.com/eea/volto-arcgis-block/commit/f8d14e9ec7f326af6d39497d9f87dd7be22f7871)
|
|
15
|
+
|
|
16
|
+
#### [0.1.49](https://github.com/eea/volto-arcgis-block/compare/0.1.48...0.1.49)
|
|
17
|
+
|
|
18
|
+
> 29 July 2022
|
|
19
|
+
|
|
20
|
+
- Develop [`#160`](https://github.com/eea/volto-arcgis-block/pull/160)
|
|
21
|
+
- Use cases tooltip bug [`#159`](https://github.com/eea/volto-arcgis-block/pull/159)
|
|
22
|
+
|
|
23
|
+
#### [0.1.48](https://github.com/eea/volto-arcgis-block/compare/0.1.47...0.1.48)
|
|
24
|
+
|
|
25
|
+
> 12 July 2022
|
|
26
|
+
|
|
27
|
+
- mapviewer bugfix [`#158`](https://github.com/eea/volto-arcgis-block/pull/158)
|
|
28
|
+
- mapviewer bugfix [`#157`](https://github.com/eea/volto-arcgis-block/pull/157)
|
|
29
|
+
- Revert "MapViewer persistence implemented" [`#156`](https://github.com/eea/volto-arcgis-block/pull/156)
|
|
30
|
+
- MapViewer persistence implemented [`#154`](https://github.com/eea/volto-arcgis-block/pull/154)
|
|
31
|
+
- Merge pull request #155 from eea/develop [`07c592d`](https://github.com/eea/volto-arcgis-block/commit/07c592dc40d943a0904b67a641c22de2251b0b64)
|
|
32
|
+
- Update cypress.json [`d02b2b8`](https://github.com/eea/volto-arcgis-block/commit/d02b2b8ee74d5059e51ab36ea95a6b0b650d92a0)
|
|
33
|
+
|
|
7
34
|
#### [0.1.47](https://github.com/eea/volto-arcgis-block/compare/0.1.46...0.1.47)
|
|
8
35
|
|
|
36
|
+
> 11 July 2022
|
|
37
|
+
|
|
9
38
|
- Arrow icon [`#153`](https://github.com/eea/volto-arcgis-block/pull/153)
|
|
10
39
|
- Revert all changes [`#152`](https://github.com/eea/volto-arcgis-block/pull/152)
|
|
11
40
|
- code coverage removal [`#150`](https://github.com/eea/volto-arcgis-block/pull/150)
|
|
12
41
|
- Revert "Mapviewer menu and map viewer options persistence" [`#149`](https://github.com/eea/volto-arcgis-block/pull/149)
|
|
13
42
|
- Mapviewer menu and map viewer options persistence [`#147`](https://github.com/eea/volto-arcgis-block/pull/147)
|
|
43
|
+
- Merge pull request #148 from eea/develop [`24266fb`](https://github.com/eea/volto-arcgis-block/commit/24266fb3a0c1662d22ae0529dc1d5a25c711cf97)
|
|
14
44
|
- Revert "Revert "Mapviewer menu and map viewer options persistence"" [`ad6e440`](https://github.com/eea/volto-arcgis-block/commit/ad6e440cdc160cffb1e86e1b26e501dbe648476c)
|
|
15
45
|
- Revert "code coverage removal" [`376f2d1`](https://github.com/eea/volto-arcgis-block/commit/376f2d1cd6e4e5110b3b63d5114af1bcfebe094b)
|
|
16
46
|
- Revert "Update cypress.json" [`43d01a0`](https://github.com/eea/volto-arcgis-block/commit/43d01a0a95a58ef5215c6cbf18223ca30a11b9cc)
|
package/package.json
CHANGED
|
@@ -155,10 +155,12 @@ class InfoWidget extends React.Component {
|
|
|
155
155
|
let data = response.value;
|
|
156
156
|
let layer = layerTypes[index];
|
|
157
157
|
let properties = [];
|
|
158
|
+
let message = 'No data available for this point in this layer';
|
|
158
159
|
if (response.status === 'rejected') {
|
|
159
160
|
this.infoData[index] = {
|
|
160
161
|
title: layer.title,
|
|
161
162
|
data: properties,
|
|
163
|
+
message: 'No data avaliable for this layer',
|
|
162
164
|
};
|
|
163
165
|
} else {
|
|
164
166
|
if (layer.isTimeSeries) {
|
|
@@ -209,6 +211,7 @@ class InfoWidget extends React.Component {
|
|
|
209
211
|
title: layer.title,
|
|
210
212
|
data: properties,
|
|
211
213
|
time: true,
|
|
214
|
+
message: message,
|
|
212
215
|
};
|
|
213
216
|
break;
|
|
214
217
|
case 'wmts':
|
|
@@ -216,6 +219,7 @@ class InfoWidget extends React.Component {
|
|
|
216
219
|
title: layer.title,
|
|
217
220
|
data: properties,
|
|
218
221
|
time: true,
|
|
222
|
+
message: message,
|
|
219
223
|
};
|
|
220
224
|
break;
|
|
221
225
|
case 'featureLayer':
|
|
@@ -223,6 +227,7 @@ class InfoWidget extends React.Component {
|
|
|
223
227
|
title: layer.title,
|
|
224
228
|
data: data,
|
|
225
229
|
time: true,
|
|
230
|
+
message: message,
|
|
226
231
|
};
|
|
227
232
|
break;
|
|
228
233
|
default:
|
|
@@ -268,12 +273,14 @@ class InfoWidget extends React.Component {
|
|
|
268
273
|
this.infoData[index] = {
|
|
269
274
|
title: layer.title,
|
|
270
275
|
data: properties,
|
|
276
|
+
message: message,
|
|
271
277
|
};
|
|
272
278
|
break;
|
|
273
279
|
case 'wmts':
|
|
274
280
|
this.infoData[index] = {
|
|
275
281
|
title: layer.title,
|
|
276
282
|
data: properties,
|
|
283
|
+
message: message,
|
|
277
284
|
};
|
|
278
285
|
break;
|
|
279
286
|
case 'featureLayer':
|
|
@@ -288,6 +295,7 @@ class InfoWidget extends React.Component {
|
|
|
288
295
|
this.infoData[index] = {
|
|
289
296
|
title: layer.title,
|
|
290
297
|
data: Object.entries(properties),
|
|
298
|
+
message: message,
|
|
291
299
|
};
|
|
292
300
|
break;
|
|
293
301
|
default:
|
|
@@ -881,11 +889,11 @@ class InfoWidget extends React.Component {
|
|
|
881
889
|
return (
|
|
882
890
|
<>
|
|
883
891
|
<div ref={this.container} className="info-container">
|
|
884
|
-
<div tooltip="
|
|
892
|
+
<div tooltip="Layer info" direction="left" type="widget">
|
|
885
893
|
<div
|
|
886
894
|
className={this.menuClass}
|
|
887
895
|
id="info_button"
|
|
888
|
-
aria-label="
|
|
896
|
+
aria-label="Layer info"
|
|
889
897
|
onClick={this.openMenu.bind(this)}
|
|
890
898
|
onKeyDown={this.openMenu.bind(this)}
|
|
891
899
|
tabIndex="0"
|
|
@@ -979,7 +987,9 @@ class InfoWidget extends React.Component {
|
|
|
979
987
|
this.loadInfoTable(this.state.layerIndex)}
|
|
980
988
|
{this.state.pixelInfo || this.state.popup ? (
|
|
981
989
|
noData && (
|
|
982
|
-
<span className="info-panel-empty">
|
|
990
|
+
<span className="info-panel-empty">
|
|
991
|
+
{this.infoData[this.state.layerIndex].message}
|
|
992
|
+
</span>
|
|
983
993
|
)
|
|
984
994
|
) : (
|
|
985
995
|
<span className="info-panel-empty">
|
|
@@ -94,10 +94,16 @@ class MapViewer extends React.Component {
|
|
|
94
94
|
basemap: 'topo',
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
if (
|
|
97
|
+
if (
|
|
98
|
+
mapStatus === null ||
|
|
99
|
+
(mapStatus.zoom === null && mapStatus.center === null) ||
|
|
100
|
+
Object.entries(mapStatus).length === 0
|
|
101
|
+
) {
|
|
98
102
|
mapStatus = {};
|
|
99
103
|
mapStatus.zoom = this.mapCfg.zoom;
|
|
100
104
|
mapStatus.center = this.mapCfg.center;
|
|
105
|
+
this.setCenterState(this.mapCfg.center);
|
|
106
|
+
this.setZoomState(this.mapCfg.zoom);
|
|
101
107
|
} else {
|
|
102
108
|
mapStatus = this.recoverState();
|
|
103
109
|
}
|
|
@@ -1031,7 +1031,7 @@ class MenuWidget extends React.Component {
|
|
|
1031
1031
|
.querySelector('input');
|
|
1032
1032
|
elem.title = dataset.title;
|
|
1033
1033
|
let groupLayers = this.getGroupLayers(group);
|
|
1034
|
-
if (groupLayers.length > 0 &&
|
|
1034
|
+
if (groupLayers.length > 0 && groupLayers[0] in this.activeLayersJSON) {
|
|
1035
1035
|
elem.hide = true;
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
@@ -1044,8 +1044,8 @@ class MenuWidget extends React.Component {
|
|
|
1044
1044
|
elem,
|
|
1045
1045
|
Object.keys(this.activeLayersJSON).length,
|
|
1046
1046
|
);
|
|
1047
|
-
this.saveLayer(elem.id);
|
|
1048
1047
|
}
|
|
1048
|
+
this.saveLayer(elem.id);
|
|
1049
1049
|
let nuts = this.map.layers.items.find((layer) => layer.title === 'nuts');
|
|
1050
1050
|
if (nuts) {
|
|
1051
1051
|
this.map.reorder(nuts, this.map.layers.items.length + 1);
|
|
@@ -382,7 +382,9 @@ class UseCasesMapViewer extends React.Component {
|
|
|
382
382
|
if (data_country > 0) {
|
|
383
383
|
string += `<div>${data_country} Use cases with one or multi-country coverage</div>`;
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
if (data.features.length === 0) {
|
|
386
|
+
string += `<div>0 Use cases</div>`;
|
|
387
|
+
}
|
|
386
388
|
view.popup.open({
|
|
387
389
|
location: {
|
|
388
390
|
latitude: response.results[0].graphic.geometry.latitude,
|