@eeacms/volto-arcgis-block 0.1.312 → 0.1.314
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,14 @@ 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.314](https://github.com/eea/volto-arcgis-block/compare/0.1.313...0.1.314) - 13 November 2024
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- CLMS-3362 (bug): Info widget properly lays out layer data from fields properties [Unai Bolivar - [`9fc0198`](https://github.com/eea/volto-arcgis-block/commit/9fc01986f796c1444acdb01faa301b690c5c3aad)]
|
|
12
|
+
- CLMS-3362 (bug): Info widget still needs work addressing map image layers [Unai Bolivar - [`e22f46b`](https://github.com/eea/volto-arcgis-block/commit/e22f46b6a00492de52df2d78e79f470da00d125e)]
|
|
13
|
+
### [0.1.313](https://github.com/eea/volto-arcgis-block/compare/0.1.312...0.1.313) - 11 November 2024
|
|
14
|
+
|
|
7
15
|
### [0.1.312](https://github.com/eea/volto-arcgis-block/compare/0.1.311...0.1.312) - 8 November 2024
|
|
8
16
|
|
|
9
17
|
### [0.1.311](https://github.com/eea/volto-arcgis-block/compare/0.1.310...0.1.311) - 22 October 2024
|
package/package.json
CHANGED
|
@@ -134,10 +134,11 @@ class InfoWidget extends React.Component {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
}
|
|
137
|
+
}
|
|
138
|
+
if (!title) {
|
|
138
139
|
title = this.getLayerTitle(layer);
|
|
139
140
|
}
|
|
140
|
-
if (layer
|
|
141
|
+
if (layer?.isTimeSeries) {
|
|
141
142
|
if (layer.url.toLowerCase().includes('wms')) {
|
|
142
143
|
layerTypes.push({
|
|
143
144
|
isTimeSeries: true,
|
|
@@ -164,14 +165,33 @@ class InfoWidget extends React.Component {
|
|
|
164
165
|
promises.push(this.identify(layer, e));
|
|
165
166
|
}
|
|
166
167
|
} else {
|
|
167
|
-
if (layer.url
|
|
168
|
+
if (layer.url?.toLowerCase().endsWith('mapserver')) {
|
|
169
|
+
const capabilitiesIndex = {
|
|
170
|
+
1: 13,
|
|
171
|
+
2: 12,
|
|
172
|
+
3: 11,
|
|
173
|
+
4: 10,
|
|
174
|
+
5: 9,
|
|
175
|
+
7: 7,
|
|
176
|
+
8: 6,
|
|
177
|
+
9: 5,
|
|
178
|
+
10: 4,
|
|
179
|
+
11: 3,
|
|
180
|
+
12: 0,
|
|
181
|
+
13: 1,
|
|
182
|
+
};
|
|
183
|
+
|
|
168
184
|
layerTypes.push({
|
|
169
185
|
isTimeSeries: false,
|
|
170
|
-
type: '
|
|
186
|
+
type: 'map-image',
|
|
171
187
|
title: title,
|
|
172
188
|
fields: layer.fields,
|
|
173
189
|
});
|
|
174
|
-
|
|
190
|
+
capabilitiesIndex[index] !== undefined
|
|
191
|
+
? promises.push(
|
|
192
|
+
this.ogcCapabilities(layer, capabilitiesIndex[index]),
|
|
193
|
+
)
|
|
194
|
+
: promises.push(Promise.reject());
|
|
175
195
|
} else if (layer.url.toLowerCase().includes('wmts')) {
|
|
176
196
|
layerTypes.push({
|
|
177
197
|
isTimeSeries: false,
|
|
@@ -205,7 +225,7 @@ class InfoWidget extends React.Component {
|
|
|
205
225
|
fields: layer.fields,
|
|
206
226
|
};
|
|
207
227
|
} else {
|
|
208
|
-
if (layer
|
|
228
|
+
if (layer?.isTimeSeries) {
|
|
209
229
|
switch (layer.type) {
|
|
210
230
|
case 'wms':
|
|
211
231
|
if (data.type === 'FeatureCollection') {
|
|
@@ -355,6 +375,26 @@ class InfoWidget extends React.Component {
|
|
|
355
375
|
fields: layer.fields,
|
|
356
376
|
};
|
|
357
377
|
break;
|
|
378
|
+
case 'map-image':
|
|
379
|
+
if (properties.length) properties = [];
|
|
380
|
+
if (data && data.fields) {
|
|
381
|
+
properties = data.fields
|
|
382
|
+
.map((field) => {
|
|
383
|
+
return Object.entries(field).map(
|
|
384
|
+
([key, value]) => {
|
|
385
|
+
return [key, value];
|
|
386
|
+
},
|
|
387
|
+
);
|
|
388
|
+
})
|
|
389
|
+
.flat();
|
|
390
|
+
}
|
|
391
|
+
this.infoData[index] = {
|
|
392
|
+
title: layer.title,
|
|
393
|
+
data: properties,
|
|
394
|
+
message: message,
|
|
395
|
+
fields: layer.fields,
|
|
396
|
+
};
|
|
397
|
+
break;
|
|
358
398
|
default:
|
|
359
399
|
break;
|
|
360
400
|
}
|
|
@@ -381,6 +421,8 @@ class InfoWidget extends React.Component {
|
|
|
381
421
|
if (layer.url.toLowerCase().includes('wmts')) {
|
|
382
422
|
// CLMS-1105
|
|
383
423
|
title = layer._wmtsTitle;
|
|
424
|
+
} else if (layer.url.toLowerCase().toLowerCase().endsWith('mapserver')) {
|
|
425
|
+
title = layer.title;
|
|
384
426
|
} else {
|
|
385
427
|
if (layer.sublayers) {
|
|
386
428
|
title = layer.sublayers.items[0].title;
|
|
@@ -482,6 +524,18 @@ class InfoWidget extends React.Component {
|
|
|
482
524
|
});
|
|
483
525
|
}
|
|
484
526
|
|
|
527
|
+
ogcCapabilities(layer, index) {
|
|
528
|
+
let url = `${layer.url}/${index}?f=pjson`;
|
|
529
|
+
return esriRequest(url, {
|
|
530
|
+
responseType: 'application/json',
|
|
531
|
+
sync: 'true',
|
|
532
|
+
}).then((response) => {
|
|
533
|
+
if (!response) return;
|
|
534
|
+
let data = JSON.parse(response.data);
|
|
535
|
+
return data;
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
485
539
|
parseCapabilities(xml, tag) {
|
|
486
540
|
let result = xml.getElementsByTagName(tag);
|
|
487
541
|
|
|
@@ -648,6 +648,8 @@ class TimesliderWidget extends React.Component {
|
|
|
648
648
|
showYearDropdown
|
|
649
649
|
minDate={this.TimesliderWidget?.fullTimeExtent?.start}
|
|
650
650
|
maxDate={this.TimesliderWidget?.fullTimeExtent?.end}
|
|
651
|
+
includeDates={this.TimesliderWidget?.stops?.dates}
|
|
652
|
+
disabledKeyboardNavigation
|
|
651
653
|
></DatePicker>
|
|
652
654
|
</div>
|
|
653
655
|
<div className="datetime-picker">
|