@eeacms/volto-arcgis-block 0.1.310 → 0.1.312
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,10 @@ 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.312](https://github.com/eea/volto-arcgis-block/compare/0.1.311...0.1.312) - 8 November 2024
|
|
8
|
+
|
|
9
|
+
### [0.1.311](https://github.com/eea/volto-arcgis-block/compare/0.1.310...0.1.311) - 22 October 2024
|
|
10
|
+
|
|
7
11
|
### [0.1.310](https://github.com/eea/volto-arcgis-block/compare/0.1.309...0.1.310) - 21 October 2024
|
|
8
12
|
|
|
9
13
|
### [0.1.309](https://github.com/eea/volto-arcgis-block/compare/0.1.308...0.1.309) - 18 October 2024
|
package/package.json
CHANGED
|
@@ -312,6 +312,15 @@ class LegendWidget extends React.Component {
|
|
|
312
312
|
this.setState({ loading: false });
|
|
313
313
|
}, 2000);
|
|
314
314
|
}
|
|
315
|
+
const collection = document.getElementsByClassName(
|
|
316
|
+
'esri-legend__layer-caption',
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
Array.prototype.forEach.call(collection, (element) => {
|
|
320
|
+
if (element?.innerText === 'LABEL3') {
|
|
321
|
+
element.style.display = 'none';
|
|
322
|
+
}
|
|
323
|
+
});
|
|
315
324
|
this.handleNoLegendMessage();
|
|
316
325
|
}
|
|
317
326
|
}
|
|
@@ -94,7 +94,7 @@ class LegendWidget extends React.Component {
|
|
|
94
94
|
*/
|
|
95
95
|
async componentDidMount() {
|
|
96
96
|
await this.loader();
|
|
97
|
-
if (!this.container.current) return;
|
|
97
|
+
//if (!this.container.current) return;
|
|
98
98
|
this.view.when(() => {
|
|
99
99
|
this.view.ui.add(this.container.current, 'top-right');
|
|
100
100
|
this.LegendWidget = new Legend({
|
|
@@ -117,7 +117,7 @@ class UseCasesMapViewer extends React.Component {
|
|
|
117
117
|
basemap: this.basemap,
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
if (!this.mapdiv.current) return;
|
|
120
|
+
//if (!this.mapdiv.current) return;
|
|
121
121
|
this.view = new MapView({
|
|
122
122
|
container: this.mapdiv.current,
|
|
123
123
|
map: this.map,
|
|
@@ -128,71 +128,71 @@ class UseCasesMapViewer extends React.Component {
|
|
|
128
128
|
},
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
this.view.when(() => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
layerControl = new LayerControl({
|
|
137
|
-
map: this.map,
|
|
138
|
-
view: this.view,
|
|
139
|
-
mapViewer: this,
|
|
140
|
-
worldDimensions: this.mapCfg.worldDimensions,
|
|
141
|
-
maxZoom: this.mapCfg.maxZoom,
|
|
142
|
-
FeatureLayer: FeatureLayer,
|
|
143
|
-
Extent: Extent,
|
|
144
|
-
});
|
|
131
|
+
// this.view.when(() => {
|
|
132
|
+
this.view.ui.add(this.zoom, {
|
|
133
|
+
position: 'top-right',
|
|
134
|
+
});
|
|
145
135
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
136
|
+
layerControl = new LayerControl({
|
|
137
|
+
map: this.map,
|
|
138
|
+
view: this.view,
|
|
139
|
+
mapViewer: this,
|
|
140
|
+
worldDimensions: this.mapCfg.worldDimensions,
|
|
141
|
+
maxZoom: this.mapCfg.maxZoom,
|
|
142
|
+
FeatureLayer: FeatureLayer,
|
|
143
|
+
Extent: Extent,
|
|
144
|
+
});
|
|
151
145
|
|
|
152
|
-
|
|
146
|
+
layerSpatial = layerControl.createLayer({
|
|
147
|
+
id: this.spatialConfig.id,
|
|
148
|
+
url: this.spatialConfig.url,
|
|
149
|
+
legend: this.spatialConfig.showLegend,
|
|
150
|
+
});
|
|
153
151
|
|
|
154
|
-
|
|
155
|
-
id: this.regionConfig.id,
|
|
156
|
-
url: this.regionConfig.url,
|
|
157
|
-
legend: this.regionConfig.showLegend,
|
|
158
|
-
});
|
|
152
|
+
layerSpatial.renderer = this.spatialConfig.render;
|
|
159
153
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
154
|
+
let layerRegion = layerControl.createLayer({
|
|
155
|
+
id: this.regionConfig.id,
|
|
156
|
+
url: this.regionConfig.url,
|
|
157
|
+
legend: this.regionConfig.showLegend,
|
|
158
|
+
});
|
|
165
159
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
160
|
+
layerHighlight = layerControl.createLayer({
|
|
161
|
+
id: this.HighlightConfig.id,
|
|
162
|
+
url: this.HighlightConfig.url,
|
|
163
|
+
legend: this.HighlightConfig.showLegend,
|
|
164
|
+
});
|
|
169
165
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
layerRegion.renderer = this.regionConfig.render;
|
|
167
|
+
layerRegion.labelingInfo = [this.regionConfig.label];
|
|
168
|
+
layerHighlight.renderer = this.HighlightConfig.render;
|
|
173
169
|
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
layerControl.addLayer(layerHighlight);
|
|
171
|
+
layerControl.addLayer(layerRegion);
|
|
172
|
+
layerControl.addLayer(layerSpatial);
|
|
176
173
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
view: this.view,
|
|
180
|
-
center: this.mapCfg.center,
|
|
181
|
-
layerControl: layerControl,
|
|
182
|
-
mapViewer: this,
|
|
183
|
-
layerRegion: layerRegion,
|
|
184
|
-
layerSpatial: layerSpatial,
|
|
185
|
-
layerHighlight: layerHighlight,
|
|
186
|
-
});
|
|
174
|
+
layerControl.hideLayer(layerHighlight.id);
|
|
175
|
+
layerControl.hideLayer(layerSpatial.id);
|
|
187
176
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
177
|
+
navigationControl = new NavigationControl({
|
|
178
|
+
map: this.map,
|
|
179
|
+
view: this.view,
|
|
180
|
+
center: this.mapCfg.center,
|
|
181
|
+
layerControl: layerControl,
|
|
182
|
+
mapViewer: this,
|
|
183
|
+
layerRegion: layerRegion,
|
|
184
|
+
layerSpatial: layerSpatial,
|
|
185
|
+
layerHighlight: layerHighlight,
|
|
194
186
|
});
|
|
195
187
|
|
|
188
|
+
this.setMapFunctions(
|
|
189
|
+
this.view,
|
|
190
|
+
layerControl,
|
|
191
|
+
navigationControl,
|
|
192
|
+
layerSpatial,
|
|
193
|
+
);
|
|
194
|
+
// });
|
|
195
|
+
|
|
196
196
|
//Once we have created the MapView, we need to ensure that the map div
|
|
197
197
|
//is refreshed in order to show the map on it. To do so, we need to
|
|
198
198
|
//trigger the renderization again, and to trigger the renderization
|