@eeacms/volto-arcgis-block 0.1.13 → 0.1.17
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 +61 -0
- package/Jenkinsfile +28 -5
- package/package.json +6 -2
- package/src/components/MapViewer/AreaWidget.jsx +88 -37
- package/src/components/MapViewer/LegendWidget.jsx +2 -0
- package/src/components/MapViewer/MapViewer.jsx +8 -0
- package/src/components/MapViewer/MenuWidget.jsx +498 -108
- package/src/components/MapViewer/TimesliderWidget.jsx +81 -0
- package/src/components/MapViewer/css/ArcgisMap.css +50 -9
- package/src/components/UseCasesMapViewer/InfoWidget.jsx +30 -32
- package/src/components/UseCasesMapViewer/LayerControl.jsx +58 -23
- package/src/components/UseCasesMapViewer/LegendWidget.jsx +122 -0
- package/src/components/UseCasesMapViewer/NavigationControl.jsx +2 -2
- package/src/components/UseCasesMapViewer/UseCasesMapViewer.jsx +39 -51
- package/src/components/UseCasesMapViewer/config.js +15 -1
- package/src/components/UseCasesMapViewer/css/ArcgisMap.css +26 -0
- package/src/components/UseCasesMapViewer/map.css +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,69 @@ 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.17](https://github.com/eea/volto-arcgis-block/compare/0.1.16...0.1.17)
|
|
8
|
+
|
|
9
|
+
- Fixed layer management & add WMTS Layer implementation [`#46`](https://github.com/eea/volto-arcgis-block/pull/46)
|
|
10
|
+
- Use cases [`#50`](https://github.com/eea/volto-arcgis-block/pull/50)
|
|
11
|
+
- Config service [`#49`](https://github.com/eea/volto-arcgis-block/pull/49)
|
|
12
|
+
- Develop [`#48`](https://github.com/eea/volto-arcgis-block/pull/48)
|
|
13
|
+
- Changed @eeacms/volto-clms-theme to @eeacms/volto-clms-utils [`#47`](https://github.com/eea/volto-arcgis-block/pull/47)
|
|
14
|
+
- Fixed mark and unmark checkbox [`#44`](https://github.com/eea/volto-arcgis-block/pull/44)
|
|
15
|
+
- Config service [`#43`](https://github.com/eea/volto-arcgis-block/pull/43)
|
|
16
|
+
- Update legend text [`#42`](https://github.com/eea/volto-arcgis-block/pull/42)
|
|
17
|
+
- Map widgets fix [`#39`](https://github.com/eea/volto-arcgis-block/pull/39)
|
|
18
|
+
- ESLint fix [`ac9ea58`](https://github.com/eea/volto-arcgis-block/commit/ac9ea585ea63629179e881056846e7dbf89973a3)
|
|
19
|
+
- Styles improvements [`a177578`](https://github.com/eea/volto-arcgis-block/commit/a177578a4651d862c2074d62943a42b3a3efd52c)
|
|
20
|
+
- ESLint fix [`b6f3600`](https://github.com/eea/volto-arcgis-block/commit/b6f3600f739e6df9adc774c33fa83a4bbb3413bc)
|
|
21
|
+
- Add volto-clms-utils [`a9a5c5f`](https://github.com/eea/volto-arcgis-block/commit/a9a5c5f1c2b27f2cc6e15045d7de9e51a11f354a)
|
|
22
|
+
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`8ff9e6f`](https://github.com/eea/volto-arcgis-block/commit/8ff9e6f6b5628450d61c1478059e4f9895840f17)
|
|
23
|
+
- WMTS Layer implementation and minor bugfix [`60037db`](https://github.com/eea/volto-arcgis-block/commit/60037db96134bc165a127f8915ad4f216d48b382)
|
|
24
|
+
- General map viewer download [`927ccba`](https://github.com/eea/volto-arcgis-block/commit/927ccbab4848fbb0a12cc94e9daf4898e0dd4653)
|
|
25
|
+
- changed @eeacms/volto-clms-utils package to npm dependency [`d9db479`](https://github.com/eea/volto-arcgis-block/commit/d9db479c2436a9ab7bbdff1ea758020dce26b20c)
|
|
26
|
+
- Changed @eeacms/volto-clms-theme/utils/useCartState to @eeacms/volto-clms-utils [`bc3ce5b`](https://github.com/eea/volto-arcgis-block/commit/bc3ce5b4be46408bdc57ef5b68b43ca5616fc158)
|
|
27
|
+
- Fixed layer management [`b4e2ae3`](https://github.com/eea/volto-arcgis-block/commit/b4e2ae360ddb7256885422d16b56e54aa800fde9)
|
|
28
|
+
- Select time extent [`857c228`](https://github.com/eea/volto-arcgis-block/commit/857c22805f2d30e4a09a802adb35920e2ab1f56c)
|
|
29
|
+
- ESLint fix [`6a75130`](https://github.com/eea/volto-arcgis-block/commit/6a75130d016fbfb8a531f16d6c8d1c67a2a4ed7b)
|
|
30
|
+
- ESLint fix [`41d68d6`](https://github.com/eea/volto-arcgis-block/commit/41d68d6d9de5665f5d994e6a47ef907c1c60c688)
|
|
31
|
+
- ESLint fix [`983d9c4`](https://github.com/eea/volto-arcgis-block/commit/983d9c47be32e6a449d880ef2a07e84442658449)
|
|
32
|
+
- Add to cart [`b18b48e`](https://github.com/eea/volto-arcgis-block/commit/b18b48e9f56a939ec7d8a822cc25bc32e8264742)
|
|
33
|
+
|
|
34
|
+
#### [0.1.16](https://github.com/eea/volto-arcgis-block/compare/0.1.15...0.1.16)
|
|
35
|
+
|
|
36
|
+
> 3 November 2021
|
|
37
|
+
|
|
38
|
+
- Develop [`#40`](https://github.com/eea/volto-arcgis-block/pull/40)
|
|
39
|
+
- Added contact info, improved popup width and added legend on zoom-in [`#38`](https://github.com/eea/volto-arcgis-block/pull/38)
|
|
40
|
+
- Added legend to zoom-in [`b902e1f`](https://github.com/eea/volto-arcgis-block/commit/b902e1fb77ce020917f72ca8a20d3e7093694812)
|
|
41
|
+
- Added contact info and improved popup width [`790a0a9`](https://github.com/eea/volto-arcgis-block/commit/790a0a9a5812ec5ef37f67ed5cca6cd0892dded2)
|
|
42
|
+
|
|
43
|
+
#### [0.1.15](https://github.com/eea/volto-arcgis-block/compare/0.1.14...0.1.15)
|
|
44
|
+
|
|
45
|
+
> 26 October 2021
|
|
46
|
+
|
|
47
|
+
- Develop [`#37`](https://github.com/eea/volto-arcgis-block/pull/37)
|
|
48
|
+
- Minor improvements on UseCasesMap [`#36`](https://github.com/eea/volto-arcgis-block/pull/36)
|
|
49
|
+
- Add missing . [`a835328`](https://github.com/eea/volto-arcgis-block/commit/a835328fdf7c23618c5b9b9398dea1eca4766906)
|
|
50
|
+
- Minor improvement [`361fa79`](https://github.com/eea/volto-arcgis-block/commit/361fa797e8b1b5f789fda6b067733d3201abb8f4)
|
|
51
|
+
- Minor improvements on UseCsaesMap [`a2c19a1`](https://github.com/eea/volto-arcgis-block/commit/a2c19a1a4a9205c9cf46e3a388a4d74ca9d202da)
|
|
52
|
+
|
|
53
|
+
#### [0.1.14](https://github.com/eea/volto-arcgis-block/compare/0.1.13...0.1.14)
|
|
54
|
+
|
|
55
|
+
> 22 October 2021
|
|
56
|
+
|
|
57
|
+
- Develop [`#35`](https://github.com/eea/volto-arcgis-block/pull/35)
|
|
58
|
+
- Bugfix on popup [`#34`](https://github.com/eea/volto-arcgis-block/pull/34)
|
|
59
|
+
- Removed setTimeout [`8de18d1`](https://github.com/eea/volto-arcgis-block/commit/8de18d1991294bb7a5ff56afd320160fb038bad2)
|
|
60
|
+
- Update 'const' & 'let', extracted variables to a config file [`f11b76c`](https://github.com/eea/volto-arcgis-block/commit/f11b76c8443353287850437f1c5299ae41fee187)
|
|
61
|
+
- Fixed popup data when changing continent [`3329795`](https://github.com/eea/volto-arcgis-block/commit/33297951141425738cd40a588ae861226a743e25)
|
|
62
|
+
- Code refactorization [`1e144a8`](https://github.com/eea/volto-arcgis-block/commit/1e144a802dd40cba572d6711e166d31c82b164ef)
|
|
63
|
+
- Added selectedPoint to be able to go back [`4c61116`](https://github.com/eea/volto-arcgis-block/commit/4c611163a9b23afb57a52cb39e345614e2824d92)
|
|
64
|
+
|
|
7
65
|
#### [0.1.13](https://github.com/eea/volto-arcgis-block/compare/0.1.12...0.1.13)
|
|
8
66
|
|
|
67
|
+
> 21 October 2021
|
|
68
|
+
|
|
69
|
+
- Develop [`#33`](https://github.com/eea/volto-arcgis-block/pull/33)
|
|
9
70
|
- Bugfix and improvements on use-cases [`#32`](https://github.com/eea/volto-arcgis-block/pull/32)
|
|
10
71
|
- Map bottom margin [`0790f2c`](https://github.com/eea/volto-arcgis-block/commit/0790f2c870fb87073aa2b15d57edf66a9548b41e)
|
|
11
72
|
- Calculate corresponding zoom with given bbox [`a766e7c`](https://github.com/eea/volto-arcgis-block/commit/a766e7cb04e957eb1d8d08e403dfd4995690bc7c)
|
package/Jenkinsfile
CHANGED
|
@@ -11,6 +11,13 @@ pipeline {
|
|
|
11
11
|
stages {
|
|
12
12
|
|
|
13
13
|
stage('Code') {
|
|
14
|
+
when {
|
|
15
|
+
allOf {
|
|
16
|
+
environment name: 'CHANGE_ID', value: ''
|
|
17
|
+
not { branch 'master' }
|
|
18
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
14
21
|
steps {
|
|
15
22
|
parallel(
|
|
16
23
|
|
|
@@ -36,6 +43,13 @@ pipeline {
|
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
stage('Tests') {
|
|
46
|
+
when {
|
|
47
|
+
allOf {
|
|
48
|
+
environment name: 'CHANGE_ID', value: ''
|
|
49
|
+
not { branch 'master' }
|
|
50
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
39
53
|
steps {
|
|
40
54
|
parallel(
|
|
41
55
|
|
|
@@ -75,6 +89,13 @@ pipeline {
|
|
|
75
89
|
}
|
|
76
90
|
|
|
77
91
|
stage('Integration tests') {
|
|
92
|
+
when {
|
|
93
|
+
allOf {
|
|
94
|
+
environment name: 'CHANGE_ID', value: ''
|
|
95
|
+
not { branch 'master' }
|
|
96
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
97
|
+
}
|
|
98
|
+
}
|
|
78
99
|
steps {
|
|
79
100
|
parallel(
|
|
80
101
|
|
|
@@ -122,11 +143,13 @@ pipeline {
|
|
|
122
143
|
}
|
|
123
144
|
|
|
124
145
|
stage('Report to SonarQube') {
|
|
125
|
-
// Exclude Pull-Requests
|
|
126
146
|
when {
|
|
127
|
-
allOf {
|
|
128
147
|
environment name: 'CHANGE_ID', value: ''
|
|
129
|
-
|
|
148
|
+
anyOf {
|
|
149
|
+
branch 'master'
|
|
150
|
+
branch 'develop'
|
|
151
|
+
}
|
|
152
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
130
153
|
}
|
|
131
154
|
steps {
|
|
132
155
|
node(label: 'swarm') {
|
|
@@ -156,8 +179,8 @@ pipeline {
|
|
|
156
179
|
steps {
|
|
157
180
|
node(label: 'docker') {
|
|
158
181
|
script {
|
|
159
|
-
if ( env.CHANGE_BRANCH != "develop"
|
|
160
|
-
error "Pipeline aborted due to PR not made from develop
|
|
182
|
+
if ( env.CHANGE_BRANCH != "develop" ) {
|
|
183
|
+
error "Pipeline aborted due to PR not made from develop branch"
|
|
161
184
|
}
|
|
162
185
|
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
|
|
163
186
|
sh '''docker pull eeacms/gitflow'''
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-arcgis-block",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "volto-arcgis-block: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: CodeSyntax",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git@github.com:eea/volto-arcgis-block.git"
|
|
17
17
|
},
|
|
18
|
+
"addons": [
|
|
19
|
+
"@eeacms/volto-clms-utils"
|
|
20
|
+
],
|
|
18
21
|
"scripts": {
|
|
19
22
|
"i18n": "NODE_ENV=production node src/i18n.js",
|
|
20
23
|
"release": "release-it",
|
|
@@ -34,7 +37,8 @@
|
|
|
34
37
|
"esri-loader": "3.1.0",
|
|
35
38
|
"@fortawesome/fontawesome-svg-core": "1.2.35",
|
|
36
39
|
"@fortawesome/free-solid-svg-icons": "5.15.3",
|
|
37
|
-
"@fortawesome/react-fontawesome": "0.1.14"
|
|
40
|
+
"@fortawesome/react-fontawesome": "0.1.14",
|
|
41
|
+
"@eeacms/volto-clms-utils": "0.1.1"
|
|
38
42
|
},
|
|
39
43
|
"devDependencies": {
|
|
40
44
|
"@cypress/code-coverage": "^3.9.5",
|
|
@@ -4,7 +4,13 @@ import React, { createRef } from 'react';
|
|
|
4
4
|
//import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
5
5
|
import { loadModules } from 'esri-loader';
|
|
6
6
|
|
|
7
|
-
var Graphic,
|
|
7
|
+
var Graphic,
|
|
8
|
+
Extent,
|
|
9
|
+
FeatureLayer,
|
|
10
|
+
GroupLayer,
|
|
11
|
+
Color,
|
|
12
|
+
SimpleLineSymbol,
|
|
13
|
+
SimpleFillSymbol;
|
|
8
14
|
|
|
9
15
|
class AreaWidget extends React.Component {
|
|
10
16
|
/**
|
|
@@ -32,14 +38,38 @@ class AreaWidget extends React.Component {
|
|
|
32
38
|
'esri/geometry/Extent',
|
|
33
39
|
'esri/layers/FeatureLayer',
|
|
34
40
|
'esri/layers/GroupLayer',
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
'esri/Color',
|
|
42
|
+
'esri/symbols/SimpleLineSymbol',
|
|
43
|
+
'esri/symbols/SimpleFillSymbol',
|
|
44
|
+
]).then(
|
|
45
|
+
([
|
|
37
46
|
_Graphic,
|
|
38
47
|
_Extent,
|
|
39
48
|
_FeatureLayer,
|
|
40
49
|
_GroupLayer,
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
_Color,
|
|
51
|
+
_SimpleLineSymbol,
|
|
52
|
+
_SimpleFillSymbol,
|
|
53
|
+
]) => {
|
|
54
|
+
[
|
|
55
|
+
Graphic,
|
|
56
|
+
Extent,
|
|
57
|
+
FeatureLayer,
|
|
58
|
+
GroupLayer,
|
|
59
|
+
Color,
|
|
60
|
+
SimpleLineSymbol,
|
|
61
|
+
SimpleFillSymbol,
|
|
62
|
+
] = [
|
|
63
|
+
_Graphic,
|
|
64
|
+
_Extent,
|
|
65
|
+
_FeatureLayer,
|
|
66
|
+
_GroupLayer,
|
|
67
|
+
_Color,
|
|
68
|
+
_SimpleLineSymbol,
|
|
69
|
+
_SimpleFillSymbol,
|
|
70
|
+
];
|
|
71
|
+
},
|
|
72
|
+
);
|
|
43
73
|
}
|
|
44
74
|
|
|
45
75
|
/**
|
|
@@ -93,7 +123,7 @@ class AreaWidget extends React.Component {
|
|
|
93
123
|
url: url,
|
|
94
124
|
id: id,
|
|
95
125
|
outFields: ['*'],
|
|
96
|
-
popupEnabled:
|
|
126
|
+
popupEnabled: false,
|
|
97
127
|
definitionExpression: 'LEVL_CODE=' + level,
|
|
98
128
|
});
|
|
99
129
|
this.nutsGroupLayer.add(layer);
|
|
@@ -129,6 +159,7 @@ class AreaWidget extends React.Component {
|
|
|
129
159
|
}),
|
|
130
160
|
symbol: fillSymbol,
|
|
131
161
|
});
|
|
162
|
+
this.props.updateArea({ origin: e.origin, end: { x: e.x, y: e.y } });
|
|
132
163
|
this.props.view.graphics.add(extentGraphic);
|
|
133
164
|
}
|
|
134
165
|
});
|
|
@@ -139,9 +170,11 @@ class AreaWidget extends React.Component {
|
|
|
139
170
|
if (this.state.ShowGraphics) {
|
|
140
171
|
this.state.ShowGraphics.remove();
|
|
141
172
|
this.setState({ ShowGraphics: null });
|
|
173
|
+
this.props.updateArea();
|
|
142
174
|
}
|
|
143
175
|
this.nutsGroupLayer.removeAll();
|
|
144
176
|
this.props.view.graphics.removeAll();
|
|
177
|
+
this.props.updateArea();
|
|
145
178
|
}
|
|
146
179
|
/**
|
|
147
180
|
* This method is executed after the rener method is executed
|
|
@@ -153,10 +186,39 @@ class AreaWidget extends React.Component {
|
|
|
153
186
|
opacity: 0.5,
|
|
154
187
|
});
|
|
155
188
|
this.props.map.add(this.nutsGroupLayer);
|
|
189
|
+
this.props.view.on('click', (event) => {
|
|
190
|
+
this.props.view.hitTest(event).then((response) => {
|
|
191
|
+
if (response.results.length > 0) {
|
|
192
|
+
let graphic = response.results.filter((result) => {
|
|
193
|
+
let layer;
|
|
194
|
+
if ('nuts0 nuts1 nuts3'.includes(result.graphic.layer.id)) {
|
|
195
|
+
layer = result.graphic;
|
|
196
|
+
}
|
|
197
|
+
return layer;
|
|
198
|
+
})[0].graphic;
|
|
199
|
+
if (graphic) {
|
|
200
|
+
let geometry = graphic.geometry;
|
|
201
|
+
if (geometry.type === 'polygon') {
|
|
202
|
+
let nuts = graphic.attributes.NUTS_ID;
|
|
203
|
+
this.props.updateArea(nuts);
|
|
204
|
+
let symbol = new SimpleFillSymbol(
|
|
205
|
+
'solid',
|
|
206
|
+
new SimpleLineSymbol('solid', new Color([232, 104, 80]), 2),
|
|
207
|
+
new Color([232, 104, 80, 0.25]),
|
|
208
|
+
);
|
|
209
|
+
let highlight = new Graphic(geometry, symbol);
|
|
210
|
+
this.props.view.graphics.removeAll();
|
|
211
|
+
this.props.view.graphics.add(highlight);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
});
|
|
156
217
|
this.props.download
|
|
157
218
|
? this.props.view.ui.add(this.container)
|
|
158
219
|
: this.props.view.ui.add(this.container.current, 'top-right');
|
|
159
220
|
}
|
|
221
|
+
|
|
160
222
|
/**
|
|
161
223
|
* This method renders the component
|
|
162
224
|
* @returns jsx
|
|
@@ -258,40 +320,30 @@ class AreaWidget extends React.Component {
|
|
|
258
320
|
</div>
|
|
259
321
|
</label>
|
|
260
322
|
</div>
|
|
261
|
-
|
|
262
|
-
<div>
|
|
263
|
-
|
|
264
|
-
<div class="
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
<
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
323
|
+
<div>
|
|
324
|
+
{/* <div class="map-download-resource">
|
|
325
|
+
<div class="ccl-form">
|
|
326
|
+
<div class="map-download-header">
|
|
327
|
+
<label for="download_area_select" class="map-download-header-title">Download resource as</label>
|
|
328
|
+
<span class="info-icon" tooltip="Info" direction="up">
|
|
329
|
+
<FontAwesomeIcon
|
|
330
|
+
className="map-menu-icon"
|
|
331
|
+
icon={['fas', 'info-circle']}
|
|
332
|
+
/>
|
|
333
|
+
</span>
|
|
334
|
+
</div>
|
|
335
|
+
<div class="ccl-select-container">
|
|
274
336
|
<div class="ccl-select-container">
|
|
275
|
-
<
|
|
276
|
-
<
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
</select>
|
|
281
|
-
</div>
|
|
337
|
+
<select class="ccl-select" id="download_area_select" name="" >
|
|
338
|
+
<option value="option1">GeoTiff</option>
|
|
339
|
+
<option value="option2">ESRI Geodatabase</option>
|
|
340
|
+
<option value="option3">SQLite Database</option>
|
|
341
|
+
</select>
|
|
282
342
|
</div>
|
|
283
343
|
</div>
|
|
284
|
-
</div> */}
|
|
285
|
-
<div class="map-download-buttons">
|
|
286
|
-
<button class="ccl-button ccl-button-green">
|
|
287
|
-
Add to cart
|
|
288
|
-
</button>
|
|
289
|
-
<button class="ccl-button ccl-button--default">
|
|
290
|
-
Cancel
|
|
291
|
-
</button>
|
|
292
344
|
</div>
|
|
293
|
-
</div>
|
|
294
|
-
|
|
345
|
+
</div> */}
|
|
346
|
+
</div>
|
|
295
347
|
</fieldset>
|
|
296
348
|
</div>
|
|
297
349
|
</div>
|
|
@@ -300,5 +352,4 @@ class AreaWidget extends React.Component {
|
|
|
300
352
|
);
|
|
301
353
|
}
|
|
302
354
|
}
|
|
303
|
-
|
|
304
355
|
export default AreaWidget;
|
|
@@ -33,6 +33,7 @@ class LegendWidget extends React.Component {
|
|
|
33
33
|
*/
|
|
34
34
|
openMenu() {
|
|
35
35
|
if (this.state.showMapMenu) {
|
|
36
|
+
this.props.mapViewer.setActiveWidget();
|
|
36
37
|
this.container.current.querySelector('.legend-panel').style.display =
|
|
37
38
|
'none';
|
|
38
39
|
this.container.current
|
|
@@ -42,6 +43,7 @@ class LegendWidget extends React.Component {
|
|
|
42
43
|
// and ensure that the component is rendered again
|
|
43
44
|
this.setState({ showMapMenu: false });
|
|
44
45
|
} else {
|
|
46
|
+
this.props.mapViewer.setActiveWidget(this);
|
|
45
47
|
this.container.current
|
|
46
48
|
.querySelector('.esri-widget--button')
|
|
47
49
|
.classList.replace('esri-icon-legend', 'esri-icon-right-arrow');
|
|
@@ -37,6 +37,11 @@ class MapViewer extends React.Component {
|
|
|
37
37
|
this.mapClass = classNames('map-container', {
|
|
38
38
|
[`${props.customClass}`]: props.customClass || null,
|
|
39
39
|
});
|
|
40
|
+
this.state = {};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
updateArea(shared_value) {
|
|
44
|
+
this.mapViewer.setState({ area: shared_value });
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
loader() {
|
|
@@ -142,6 +147,7 @@ class MapViewer extends React.Component {
|
|
|
142
147
|
map={this.map}
|
|
143
148
|
mapViewer={this}
|
|
144
149
|
download={this.props.mapviewer_config.Download}
|
|
150
|
+
updateArea={this.updateArea}
|
|
145
151
|
/>
|
|
146
152
|
);
|
|
147
153
|
}
|
|
@@ -159,6 +165,8 @@ class MapViewer extends React.Component {
|
|
|
159
165
|
download={this.props.mapviewer_config.Download}
|
|
160
166
|
map={this.map}
|
|
161
167
|
mapViewer={this}
|
|
168
|
+
updateArea={this.updateArea}
|
|
169
|
+
area={this.state.area}
|
|
162
170
|
/>
|
|
163
171
|
); //call conf
|
|
164
172
|
}
|