@eeacms/volto-arcgis-block 0.1.273 → 0.1.275
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,10 +4,19 @@ 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.275](https://github.com/eea/volto-arcgis-block/compare/0.1.274...0.1.275) - 19 April 2024
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
+
- CLMS-3157 (feat): improve graphic color and transparency [Unai Bolivar - [`4f02a02`](https://github.com/eea/volto-arcgis-block/commit/4f02a02eda72f9b663e1694b79d003234bc71895)]
|
|
12
|
+
- CLMS-3157 (bug): committing current work on graphics. Incomplete ticket. [Unai Bolivar - [`45e7d04`](https://github.com/eea/volto-arcgis-block/commit/45e7d041aed301c28ed1f3ab23de6db61a1e17a8)]
|
|
13
|
+
### [0.1.274](https://github.com/eea/volto-arcgis-block/compare/0.1.273...0.1.274) - 12 April 2024
|
|
14
|
+
|
|
15
|
+
### [0.1.273](https://github.com/eea/volto-arcgis-block/compare/0.1.272...0.1.273) - 11 April 2024
|
|
16
|
+
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
18
|
+
|
|
19
|
+
- Merge pull request #748 from eea/develop [Unai Bolivar - [`d3f8aeb`](https://github.com/eea/volto-arcgis-block/commit/d3f8aebc3d225cc0e9bd62e7e1f816da38e866b9)]
|
|
11
20
|
- CLMS-3172 (bug): re-projected file upload area extent to spatial reference wkid 4326 lat/long [Unai Bolivar - [`164cbca`](https://github.com/eea/volto-arcgis-block/commit/164cbcad7a035c85e77b2c545a331629a0cb8fbd)]
|
|
12
21
|
### [0.1.272](https://github.com/eea/volto-arcgis-block/compare/0.1.271...0.1.272) - 10 April 2024
|
|
13
22
|
|
package/package.json
CHANGED
|
@@ -120,6 +120,9 @@ class AreaWidget extends React.Component {
|
|
|
120
120
|
this.props.mapViewer.setActiveWidget();
|
|
121
121
|
this.container.current.querySelector('.right-panel').style.display =
|
|
122
122
|
'none';
|
|
123
|
+
this.container.current.querySelector(
|
|
124
|
+
'.right-panel-content',
|
|
125
|
+
).style.overflowY = 'auto';
|
|
123
126
|
this.container.current
|
|
124
127
|
.querySelector('.esri-widget--button')
|
|
125
128
|
.classList.remove('active-widget');
|
|
@@ -142,6 +145,9 @@ class AreaWidget extends React.Component {
|
|
|
142
145
|
this.props.mapViewer.setActiveWidget(this);
|
|
143
146
|
this.container.current.querySelector('.right-panel').style.display =
|
|
144
147
|
'flex';
|
|
148
|
+
this.container.current.querySelector(
|
|
149
|
+
'.right-panel-content',
|
|
150
|
+
).style.overflowY = 'hidden';
|
|
145
151
|
this.container.current
|
|
146
152
|
.querySelector('.esri-widget--button')
|
|
147
153
|
.classList.add('active-widget');
|
|
@@ -361,19 +367,19 @@ class AreaWidget extends React.Component {
|
|
|
361
367
|
.then((response) => {
|
|
362
368
|
if (response.data && response.data.featureCollection) {
|
|
363
369
|
//Check for more than a single feature
|
|
364
|
-
|
|
365
|
-
|
|
370
|
+
let featureCollection = response.data.featureCollection;
|
|
371
|
+
if (this.checkFeatureCount(featureCollection) === false) return;
|
|
366
372
|
|
|
367
373
|
//Check that attributes and geometry are not null or undefined
|
|
368
374
|
if (
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
375
|
+
featureCollection.layers[0].featureSet.features[0].attributes ===
|
|
376
|
+
null ||
|
|
377
|
+
featureCollection.layers[0].featureSet.features[0].attributes ===
|
|
378
|
+
undefined ||
|
|
379
|
+
featureCollection.layers[0].featureSet.features[0].geometry ===
|
|
380
|
+
null ||
|
|
381
|
+
featureCollection.layers[0].featureSet.features[0].geometry ===
|
|
382
|
+
undefined
|
|
377
383
|
) {
|
|
378
384
|
this.setState({
|
|
379
385
|
showInfoPopup: true,
|
|
@@ -383,7 +389,7 @@ class AreaWidget extends React.Component {
|
|
|
383
389
|
}
|
|
384
390
|
|
|
385
391
|
//Create a feature layer from the feature collection
|
|
386
|
-
this.addFeatureCollectionToMap(
|
|
392
|
+
this.addFeatureCollectionToMap(featureCollection);
|
|
387
393
|
} else {
|
|
388
394
|
//console.error('Unexpected response structure:', response);
|
|
389
395
|
}
|
|
@@ -411,28 +417,29 @@ class AreaWidget extends React.Component {
|
|
|
411
417
|
// see the 'Feature Collection in Local Storage' sample for an example of how to work with local storage
|
|
412
418
|
addFeatureCollectionToMap(featureCollection) {
|
|
413
419
|
let sourceGraphics = [];
|
|
414
|
-
//const symbol = new SimpleFillSymbol({
|
|
415
|
-
// //type: 'simple-fill',
|
|
416
|
-
// color: [255, 255, 255, 0.5],
|
|
417
|
-
// outline: {
|
|
418
|
-
// color: [0, 0, 0],
|
|
419
|
-
// width: 1,
|
|
420
|
-
// },
|
|
421
|
-
//});
|
|
422
420
|
|
|
423
421
|
//Create a graphic for each feature in the feature collection
|
|
424
422
|
|
|
425
423
|
const layers = featureCollection.layers.map((layer) => {
|
|
426
424
|
const graphics = layer.featureSet.features.map((feature) => {
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
const polygonSymbol = {
|
|
426
|
+
type: 'simple-fill', // autocasts as new SimpleFillSymbol()
|
|
427
|
+
color: [234, 168, 72, 0.8],
|
|
428
|
+
outline: {
|
|
429
|
+
// autocasts as new SimpleLineSymbol()
|
|
430
|
+
color: '#000000',
|
|
431
|
+
width: 0.1,
|
|
432
|
+
},
|
|
433
|
+
};
|
|
434
|
+
let graphic = Graphic.fromJSON(feature);
|
|
435
|
+
graphic.symbol = polygonSymbol;
|
|
436
|
+
return graphic;
|
|
429
437
|
});
|
|
430
438
|
sourceGraphics = sourceGraphics.concat(graphics);
|
|
431
439
|
|
|
432
440
|
// Create a feature layer from the feature collection fields and gaphics
|
|
433
441
|
|
|
434
442
|
const featureLayer = new FeatureLayer({
|
|
435
|
-
// id: 9,
|
|
436
443
|
objectIdField: 'FID',
|
|
437
444
|
source: graphics,
|
|
438
445
|
legendEnabled: false,
|
|
@@ -1100,7 +1107,7 @@ class AreaWidget extends React.Component {
|
|
|
1100
1107
|
>
|
|
1101
1108
|
<div className="field">
|
|
1102
1109
|
<label className="file-upload">
|
|
1103
|
-
<span>File formats supported: shp(zip)</span>
|
|
1110
|
+
<span>File formats supported: shp(zip), geojson</span>
|
|
1104
1111
|
<input
|
|
1105
1112
|
type="file"
|
|
1106
1113
|
name="file"
|
|
@@ -1238,7 +1245,7 @@ class AreaWidget extends React.Component {
|
|
|
1238
1245
|
<FontAwesomeIcon icon={['fas', 'info-circle']} />
|
|
1239
1246
|
</span>
|
|
1240
1247
|
<div className="drawRectanglePopup-text">
|
|
1241
|
-
Invalid
|
|
1248
|
+
Invalid file format, or incomplete shapefile.
|
|
1242
1249
|
</div>
|
|
1243
1250
|
</>
|
|
1244
1251
|
)}
|
|
@@ -317,13 +317,12 @@ div.esri-popover
|
|
|
317
317
|
margin: 0;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
.area-container .area-header {
|
|
321
|
-
|
|
322
|
-
}
|
|
320
|
+
/* .area-container .area-header { */
|
|
321
|
+
/* margin-bottom: 1rem; */
|
|
322
|
+
/* } */
|
|
323
323
|
|
|
324
324
|
.area-header {
|
|
325
325
|
padding: 1rem;
|
|
326
|
-
background-color: rgba(160, 177, 40, 0.5);
|
|
327
326
|
font-weight: bold;
|
|
328
327
|
}
|
|
329
328
|
|
|
@@ -344,6 +343,10 @@ div.esri-popover
|
|
|
344
343
|
margin-left: 1rem !important;
|
|
345
344
|
}
|
|
346
345
|
|
|
346
|
+
.area-panel .ccl-form:last-child {
|
|
347
|
+
border-bottom: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
347
350
|
.nuts-form {
|
|
348
351
|
margin-top: 0.5rem;
|
|
349
352
|
margin-left: 2rem;
|
|
@@ -351,7 +354,7 @@ div.esri-popover
|
|
|
351
354
|
|
|
352
355
|
div.area-container .ccl-form .ccl-form-check-input + .ccl-form-radio-label {
|
|
353
356
|
display: flex;
|
|
354
|
-
justify-content:
|
|
357
|
+
justify-content: flex-start;
|
|
355
358
|
padding-left: 1.75rem;
|
|
356
359
|
}
|
|
357
360
|
|
|
@@ -360,8 +363,11 @@ label.ccl-form-radio-label span.nuts-menu-icon {
|
|
|
360
363
|
}
|
|
361
364
|
|
|
362
365
|
.area-container .esri-button {
|
|
366
|
+
max-width: fit-content;
|
|
367
|
+
padding: 6px;
|
|
363
368
|
border-color: #a0b128;
|
|
364
|
-
margin-left:
|
|
369
|
+
margin-left: auto;
|
|
370
|
+
/* margin-left: 0.25rem; */
|
|
365
371
|
background-color: #a0b128;
|
|
366
372
|
color: white !important;
|
|
367
373
|
transition: all 0.3s ease-out;
|