@eeacms/volto-eea-map 0.1.21 → 0.1.23
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,11 +4,21 @@ 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.
|
|
7
|
+
### [0.1.23](https://github.com/eea/volto-eea-map/compare/0.1.22...0.1.23) - 14 September 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- lint fix [andreiggr - [`403512e`](https://github.com/eea/volto-eea-map/commit/403512e1e354a333b71797cd4bf9bdcfb96e7134)]
|
|
12
|
+
- fix print sizes [andreiggr - [`c75b290`](https://github.com/eea/volto-eea-map/commit/c75b29014ca606af6ea54f003db08aad764532ab)]
|
|
13
|
+
- set min/max scale if available on layer [andreiggr - [`9790d7f`](https://github.com/eea/volto-eea-map/commit/9790d7fbd080fdbb6e3433d769ed7eba718cc008)]
|
|
14
|
+
### [0.1.22](https://github.com/eea/volto-eea-map/compare/0.1.21...0.1.22) - 13 September 2022
|
|
8
15
|
|
|
9
16
|
#### :hammer_and_wrench: Others
|
|
10
17
|
|
|
11
|
-
-
|
|
18
|
+
- fine-tune useeffect [andreiggr - [`d7d9d7b`](https://github.com/eea/volto-eea-map/commit/d7d9d7b8dbf510dead8b1acc85bc29c64d0449d2)]
|
|
19
|
+
- update documentation [andreiggr - [`0af2227`](https://github.com/eea/volto-eea-map/commit/0af22279f89b73107df7804e81a3a30b8f13a730)]
|
|
20
|
+
### [0.1.21](https://github.com/eea/volto-eea-map/compare/0.1.20...0.1.21) - 13 September 2022
|
|
21
|
+
|
|
12
22
|
### [0.1.20](https://github.com/eea/volto-eea-map/compare/0.1.19...0.1.20) - 31 August 2022
|
|
13
23
|
|
|
14
24
|
#### :hammer_and_wrench: Others
|
package/README.md
CHANGED
|
@@ -1,103 +1,87 @@
|
|
|
1
1
|
# volto-addon-template
|
|
2
2
|
|
|
3
|
-
[](https://github.com/eea/volto-eea-map/releases)
|
|
4
4
|
|
|
5
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-
|
|
5
|
+
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-eea-map/job/master/display/redirect)
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-master)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-master)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-master)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-master)
|
|
10
10
|
|
|
11
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-
|
|
11
|
+
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-eea-map/job/develop/display/redirect)
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
[Volto](https://github.com/plone/volto) add-on
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# volto-eea-map
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
npm install -g yo @plone/generator-volto mrs-developer
|
|
27
27
|
|
|
28
|
-
1.
|
|
28
|
+
1. Create new volto app
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
docker pull plone/volto
|
|
33
|
-
```
|
|
30
|
+
yo @plone/volto my-volto-project --addon @eeacms/volto-eea-map --skip-install
|
|
31
|
+
cd my-volto-project
|
|
34
32
|
|
|
35
|
-
1.
|
|
36
|
-
```
|
|
37
|
-
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
38
|
-
```
|
|
33
|
+
1. Add the following to `mrs.developer.json`:
|
|
39
34
|
|
|
40
|
-
|
|
35
|
+
{
|
|
36
|
+
"volto-eea-map": {
|
|
37
|
+
"url": "https://github.com/eea/volto-eea-map.git",
|
|
38
|
+
"package": "@eeacms/volto-eea-map",
|
|
39
|
+
"branch": "develop",
|
|
40
|
+
"path": "src"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-addon-template" plone/volto
|
|
44
|
-
```
|
|
44
|
+
1. Install
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
yarn develop
|
|
47
|
+
yarn
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
1. Start backend
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
docker pull plone
|
|
52
|
+
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
...wait for backend to setup and start - `Ready to handle requests`:
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
docker logs -f plone
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
"addons": [
|
|
58
|
-
"@eeacms/volto-addon-template"
|
|
59
|
-
],
|
|
58
|
+
...you can also check http://localhost:8080/Plone
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
"@eeacms/volto-addon-template": "^1.0.0"
|
|
63
|
-
}
|
|
64
|
-
```
|
|
60
|
+
1. Start frontend
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
yarn start
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
npm install -g yo @plone/generator-volto
|
|
70
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-addon-template
|
|
71
|
-
cd my-volto-project
|
|
72
|
-
```
|
|
64
|
+
1. Go to http://localhost:3000
|
|
73
65
|
|
|
74
|
-
1.
|
|
66
|
+
1. Happy hacking!
|
|
75
67
|
|
|
76
|
-
|
|
77
|
-
yarn
|
|
78
|
-
yarn start
|
|
79
|
-
```
|
|
68
|
+
cd src/addons/volto-eea-map/
|
|
80
69
|
|
|
81
|
-
|
|
70
|
+
# Configuration
|
|
82
71
|
|
|
83
|
-
|
|
72
|
+
This addon contains the EEA Embed Map Block & EEA Map Block. It's configured to work with the map visualization content type and give more access to ArcGIS maps. See available maps here https://discomap.eea.europa.eu/
|
|
84
73
|
|
|
85
|
-
|
|
74
|
+
# Enable data queries auto-import
|
|
86
75
|
|
|
87
|
-
|
|
76
|
+
To enable automatic import of queries from the content-type, "Parameters for data connections" should be checked as behavior on the content-type that uses the map.
|
|
88
77
|
|
|
89
|
-
|
|
78
|
+
controlpanel/dexterity-types/{content-type-id}
|
|
79
|
+
# Enable Sources
|
|
90
80
|
|
|
91
|
-
|
|
81
|
+
Sources (Data provenance) should be set on the visualization. To enable this, "EEA Core Metadata" should be checked as behavior on the visualization content-type.
|
|
92
82
|
|
|
93
|
-
|
|
83
|
+
controlpanel/dexterity-types/map_visualization
|
|
84
|
+
|
|
85
|
+
After this, sources can be added from the visualization edit interface. "Data Provenance" tab => "Add source"
|
|
94
86
|
|
|
95
|
-
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
|
96
|
-
All Rights Reserved.
|
|
97
|
-
|
|
98
|
-
See [LICENSE.md](https://github.com/eea/volto-addon-template/blob/master/LICENSE.md) for details.
|
|
99
|
-
|
|
100
|
-
## Funding
|
|
101
|
-
|
|
102
|
-
[European Environment Agency (EU)](http://eea.europa.eu)
|
|
103
87
|
|
package/package.json
CHANGED
|
@@ -34,8 +34,7 @@ const Edit = (props) => {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
-
}, [props.
|
|
38
|
-
|
|
37
|
+
}, [props.block, props.data_query, data.data_query_params]);
|
|
39
38
|
return (
|
|
40
39
|
<div>
|
|
41
40
|
<View data={data} id={id} isEdit={true} />
|
|
@@ -101,6 +101,8 @@ const Webmap = (props) => {
|
|
|
101
101
|
case 'Raster Layer':
|
|
102
102
|
mapLayer = new MapImageLayer({
|
|
103
103
|
url: map_service_url,
|
|
104
|
+
minScale: layer.minScale ? layer.minScale : '',
|
|
105
|
+
maxScale: layer.maxScale ? layer.maxScale : '',
|
|
104
106
|
});
|
|
105
107
|
break;
|
|
106
108
|
case 'Feature Layer':
|
|
@@ -109,6 +111,8 @@ const Webmap = (props) => {
|
|
|
109
111
|
definitionExpression: query
|
|
110
112
|
? formatQuery(query, 'sql')
|
|
111
113
|
: '',
|
|
114
|
+
minScale: layer.minScale ? layer.minScale : '',
|
|
115
|
+
maxScale: layer.maxScale ? layer.maxScale : '',
|
|
112
116
|
});
|
|
113
117
|
break;
|
|
114
118
|
case 'Group Layer':
|
|
@@ -124,7 +128,7 @@ const Webmap = (props) => {
|
|
|
124
128
|
basemap: base_layer || 'hybrid',
|
|
125
129
|
layers,
|
|
126
130
|
});
|
|
127
|
-
|
|
131
|
+
console.log(layers, 'the layers');
|
|
128
132
|
const view = new MapView({
|
|
129
133
|
container: mapRef.current,
|
|
130
134
|
map,
|
|
@@ -78,6 +78,7 @@ const LayerLegend = ({ data, show_viewer }) => {
|
|
|
78
78
|
<span key={i} style={{ display: 'flex', alignItems: 'center' }}>
|
|
79
79
|
<img
|
|
80
80
|
alt="alt"
|
|
81
|
+
className="layer-legend-item-color"
|
|
81
82
|
src={`data:image/png;base64,${item.imageData}`}
|
|
82
83
|
/>
|
|
83
84
|
<span style={{ fontSize: '13px', marginLeft: '5px' }}>
|