@eeacms/volto-arcgis-block 0.1.400 → 0.1.402
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,17 @@ 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.402](https://github.com/eea/volto-arcgis-block/compare/0.1.401...0.1.402) - 3 November 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- (bug): Using full extent takes user to correct area [Unai Bolivar - [`9ad099c`](https://github.com/eea/volto-arcgis-block/commit/9ad099c01aacc8f0c988b8e100048cabcbedaa38)]
|
|
12
|
+
- (bug): Correcting full extent bug for CDSE product geometries and BBoxes [Unai Bolivar - [`579438b`](https://github.com/eea/volto-arcgis-block/commit/579438b64a077eb85c919a7ccd300ffa0e455153)]
|
|
13
|
+
### [0.1.401](https://github.com/eea/volto-arcgis-block/compare/0.1.400...0.1.401) - 29 October 2025
|
|
14
|
+
|
|
15
|
+
#### :hammer_and_wrench: Others
|
|
16
|
+
|
|
17
|
+
- (bug): HOTPSOT widget bugs corrected for sentry and loading mapviewer without downloading unecessary files if widget is not in use [Unai Bolivar - [`d83bcdf`](https://github.com/eea/volto-arcgis-block/commit/d83bcdfafe6979e012ac848362269fe23277bd5b)]
|
|
7
18
|
### [0.1.400](https://github.com/eea/volto-arcgis-block/compare/0.1.399...0.1.400) - 29 October 2025
|
|
8
19
|
|
|
9
20
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -75,14 +75,37 @@ class HotspotWidget extends React.Component {
|
|
|
75
75
|
this.props.urls.klc_bbox;
|
|
76
76
|
return esriRequest(url, {
|
|
77
77
|
responseType: 'json',
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
})
|
|
79
|
+
.then((response) => {
|
|
80
|
+
const responseJSON = response.data;
|
|
81
|
+
if (Array.isArray(responseJSON)) {
|
|
82
|
+
this.dataBBox = responseJSON;
|
|
83
|
+
} else {
|
|
84
|
+
this.dataBBox = [];
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.catch(async () => {
|
|
88
|
+
try {
|
|
89
|
+
const res = await fetch(url, { credentials: 'same-origin' });
|
|
90
|
+
const text = await res.text();
|
|
91
|
+
const start = text.indexOf('[');
|
|
92
|
+
const end = text.lastIndexOf(']');
|
|
93
|
+
if (start !== -1 && end !== -1) {
|
|
94
|
+
const json = JSON.parse(text.substring(start, end + 1));
|
|
95
|
+
this.dataBBox = Array.isArray(json) ? json : [];
|
|
96
|
+
} else {
|
|
97
|
+
this.dataBBox = [];
|
|
98
|
+
}
|
|
99
|
+
} catch (_) {
|
|
100
|
+
this.dataBBox = [];
|
|
101
|
+
}
|
|
102
|
+
});
|
|
82
103
|
};
|
|
83
104
|
|
|
84
105
|
setBBoxCoordinates = (data) => {
|
|
106
|
+
if (!data || !Array.isArray(data)) return;
|
|
85
107
|
let klc_array = data.find((e) => e.klc_code === this.dataKlc_code);
|
|
108
|
+
if (!klc_array || !klc_array.bbox) return;
|
|
86
109
|
let klc_bbox_coordinates = klc_array.bbox.split(',');
|
|
87
110
|
let xmin_ymin = klc_bbox_coordinates[0].split(' ');
|
|
88
111
|
let xmax_ymax = klc_bbox_coordinates[1].split(' ');
|
|
@@ -92,10 +115,6 @@ class HotspotWidget extends React.Component {
|
|
|
92
115
|
ymin: this.mapCfg.geometryZoomIn.ymin,
|
|
93
116
|
xmax: this.mapCfg.geometryZoomIn.xmax,
|
|
94
117
|
ymax: this.mapCfg.geometryZoomIn.ymax,
|
|
95
|
-
// xmin: -200,
|
|
96
|
-
// ymin: -85,
|
|
97
|
-
// xmax: 200,
|
|
98
|
-
// ymax: 85,
|
|
99
118
|
spatialReference: 4326,
|
|
100
119
|
});
|
|
101
120
|
this.props.view.constraints.geometry = constraintExtent;
|
|
@@ -205,19 +224,15 @@ class HotspotWidget extends React.Component {
|
|
|
205
224
|
typeLegend,
|
|
206
225
|
selectBoxTime,
|
|
207
226
|
) {
|
|
208
|
-
|
|
227
|
+
if (!bboxData || !Array.isArray(bboxData)) return;
|
|
209
228
|
if (filteredLayersData[typeLegend] !== undefined) {
|
|
210
229
|
delete filteredLayersData[typeLegend];
|
|
211
230
|
}
|
|
212
|
-
//Find the bbox data for the chosen region
|
|
213
231
|
let klc_array = bboxData.find((e) => e.klc_code === this.dataKlc_code);
|
|
214
|
-
|
|
215
|
-
//Parse the bbox data into finer detail
|
|
232
|
+
if (!klc_array || !klc_array.bbox) return;
|
|
216
233
|
let klc_bbox_coordinates = klc_array.bbox.split(',');
|
|
217
234
|
let xmin_ymin = klc_bbox_coordinates[0].split(' ');
|
|
218
235
|
let xmax_ymax = klc_bbox_coordinates[1].split(' ');
|
|
219
|
-
|
|
220
|
-
//Add the filtered data to the filteredLayersData object
|
|
221
236
|
filteredLayersData[typeLegend] = {
|
|
222
237
|
klc_code: this.dataKlc_code,
|
|
223
238
|
year: selectBoxTime,
|
|
@@ -242,7 +257,9 @@ class HotspotWidget extends React.Component {
|
|
|
242
257
|
this.props.hotspotData && this.props.hotspotData['filteredLayers']
|
|
243
258
|
? Object.keys(this.props.hotspotData['filteredLayers'])
|
|
244
259
|
: [];
|
|
245
|
-
let filteredLayersData =
|
|
260
|
+
let filteredLayersData =
|
|
261
|
+
(this.props.hotspotData && this.props.hotspotData['filteredLayerData']) ||
|
|
262
|
+
[];
|
|
246
263
|
let layersToAdd = {};
|
|
247
264
|
let bookmarkHotspotFilter = JSON.parse(
|
|
248
265
|
localStorage.getItem('bookmarkHotspotFilter'),
|
|
@@ -441,9 +458,14 @@ class HotspotWidget extends React.Component {
|
|
|
441
458
|
}
|
|
442
459
|
|
|
443
460
|
filteredLayersToHotspotData(layerIds, layersData) {
|
|
444
|
-
let updatedFilteredLayers =
|
|
445
|
-
|
|
446
|
-
|
|
461
|
+
let updatedFilteredLayers =
|
|
462
|
+
(this.props.hotspotData && this.props.hotspotData['filteredLayers']) ||
|
|
463
|
+
{};
|
|
464
|
+
let filteredLayersData =
|
|
465
|
+
(this.props.hotspotData &&
|
|
466
|
+
this.props.hotspotData['filteredLayersData']) ||
|
|
467
|
+
{};
|
|
468
|
+
let newHotspotData = this.props.hotspotData || {};
|
|
447
469
|
layerIds.forEach((layerId) => {
|
|
448
470
|
let layer = Object.entries(this.layers).find(
|
|
449
471
|
([key, value]) => key === layerId,
|
|
@@ -536,7 +558,10 @@ class HotspotWidget extends React.Component {
|
|
|
536
558
|
|
|
537
559
|
renderApplyFilterButton() {
|
|
538
560
|
let typeFilter = [];
|
|
539
|
-
const activeLayers =
|
|
561
|
+
const activeLayers =
|
|
562
|
+
this.props.hotspotData && this.props.hotspotData['activeLayers']
|
|
563
|
+
? Object.keys(this.props.hotspotData['activeLayers'])
|
|
564
|
+
: [];
|
|
540
565
|
|
|
541
566
|
if (
|
|
542
567
|
this.container.current.querySelector('.presentLandCoverContainer').style
|
|
@@ -2888,7 +2888,7 @@ class MenuWidget extends React.Component {
|
|
|
2888
2888
|
) {
|
|
2889
2889
|
this.extentInitiated = true;
|
|
2890
2890
|
// setTimeout(() => {
|
|
2891
|
-
this.
|
|
2891
|
+
this.fullExtentDataset(elem);
|
|
2892
2892
|
// }, 2000);
|
|
2893
2893
|
}
|
|
2894
2894
|
}
|
|
@@ -3879,24 +3879,69 @@ class MenuWidget extends React.Component {
|
|
|
3879
3879
|
|
|
3880
3880
|
async datasetFullExtentFromPayload(payload) {
|
|
3881
3881
|
if (!payload) return null;
|
|
3882
|
-
if (
|
|
3882
|
+
if (
|
|
3883
|
+
payload.metadata &&
|
|
3884
|
+
Array.isArray(payload.metadata.bbox) &&
|
|
3885
|
+
payload.metadata.bbox.length === 4
|
|
3886
|
+
) {
|
|
3887
|
+
const srName = payload.metadata?.geometry?.crs?.properties?.name || '';
|
|
3888
|
+
const isCRS84 =
|
|
3889
|
+
typeof srName === 'string' && srName.toUpperCase().includes('CRS84');
|
|
3883
3890
|
return new Extent({
|
|
3884
|
-
xmin: payload.
|
|
3885
|
-
ymin: payload.
|
|
3886
|
-
xmax: payload.
|
|
3887
|
-
ymax: payload.
|
|
3888
|
-
spatialReference: { wkid: 3857 },
|
|
3891
|
+
xmin: payload.metadata.bbox[0],
|
|
3892
|
+
ymin: payload.metadata.bbox[1],
|
|
3893
|
+
xmax: payload.metadata.bbox[2],
|
|
3894
|
+
ymax: payload.metadata.bbox[3],
|
|
3895
|
+
spatialReference: isCRS84 ? { wkid: 4326 } : { wkid: 3857 },
|
|
3889
3896
|
});
|
|
3890
|
-
}
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3897
|
+
} else if (
|
|
3898
|
+
payload.metadata &&
|
|
3899
|
+
payload.metadata.geometry &&
|
|
3900
|
+
payload.metadata.geometry.coordinates
|
|
3901
|
+
) {
|
|
3902
|
+
const srName = payload.metadata?.geometry?.crs?.properties?.name || '';
|
|
3903
|
+
const isCRS84 =
|
|
3904
|
+
typeof srName === 'string' && srName.toUpperCase().includes('CRS84');
|
|
3905
|
+
const coords = payload.metadata.geometry.coordinates;
|
|
3906
|
+
let xmin = Infinity,
|
|
3907
|
+
ymin = Infinity,
|
|
3908
|
+
xmax = -Infinity,
|
|
3909
|
+
ymax = -Infinity;
|
|
3910
|
+
const walk = (arr) => {
|
|
3911
|
+
if (!Array.isArray(arr)) return;
|
|
3912
|
+
if (typeof arr[0] === 'number' && typeof arr[1] === 'number') {
|
|
3913
|
+
const x = Number(arr[0]);
|
|
3914
|
+
const y = Number(arr[1]);
|
|
3915
|
+
if (isFinite(x) && isFinite(y)) {
|
|
3916
|
+
if (x < xmin) xmin = x;
|
|
3917
|
+
if (x > xmax) xmax = x;
|
|
3918
|
+
if (y < ymin) ymin = y;
|
|
3919
|
+
if (y > ymax) ymax = y;
|
|
3920
|
+
}
|
|
3921
|
+
return;
|
|
3922
|
+
}
|
|
3923
|
+
for (let i = 0; i < arr.length; i++) walk(arr[i]);
|
|
3924
|
+
};
|
|
3925
|
+
walk(coords);
|
|
3926
|
+
if (
|
|
3927
|
+
isFinite(xmin) &&
|
|
3928
|
+
isFinite(ymin) &&
|
|
3929
|
+
isFinite(xmax) &&
|
|
3930
|
+
isFinite(ymax)
|
|
3931
|
+
) {
|
|
3932
|
+
return new Extent({
|
|
3933
|
+
xmin: xmin,
|
|
3934
|
+
ymin: ymin,
|
|
3935
|
+
xmax: xmax,
|
|
3936
|
+
ymax: ymax,
|
|
3937
|
+
spatialReference: isCRS84 ? { wkid: 4326 } : { wkid: 3857 },
|
|
3938
|
+
});
|
|
3939
|
+
}
|
|
3895
3940
|
}
|
|
3896
3941
|
return null;
|
|
3897
3942
|
}
|
|
3898
3943
|
|
|
3899
|
-
async
|
|
3944
|
+
async fullExtentDataset(elem) {
|
|
3900
3945
|
const serviceLayer = this.state.wmsUserServiceLayers.find(
|
|
3901
3946
|
(layer) => layer.LayerId === elem.id,
|
|
3902
3947
|
);
|
|
@@ -3910,12 +3955,47 @@ class MenuWidget extends React.Component {
|
|
|
3910
3955
|
['/ogc/', '/cdse/'].some((s) => this.url.toLowerCase().includes(s));
|
|
3911
3956
|
let BBoxes = {};
|
|
3912
3957
|
if (isCDSE) {
|
|
3913
|
-
|
|
3958
|
+
let d =
|
|
3914
3959
|
this.layers[elem.id]?.DatasetDownloadInformation ||
|
|
3915
3960
|
this.layers[elem.id]?.datasetDownloadInformation ||
|
|
3961
|
+
this.layers[elem.id]?.dataset_download_information ||
|
|
3916
3962
|
{};
|
|
3917
|
-
|
|
3918
|
-
|
|
3963
|
+
let byoc = d && d.items && d.items[0] ? d.items[0].byoc_collection : null;
|
|
3964
|
+
|
|
3965
|
+
if (!byoc) {
|
|
3966
|
+
let parentId = elem.getAttribute('parentid');
|
|
3967
|
+
let datasetInput = document.getElementById(parentId);
|
|
3968
|
+
let datasetContainer = datasetInput
|
|
3969
|
+
? datasetInput.closest('.map-menu-dataset-dropdown')
|
|
3970
|
+
: null;
|
|
3971
|
+
let datasetId = datasetContainer
|
|
3972
|
+
? datasetContainer.getAttribute('datasetid')
|
|
3973
|
+
: null;
|
|
3974
|
+
if (datasetId && this.compCfg && Array.isArray(this.compCfg)) {
|
|
3975
|
+
for (let i = 0; i < this.compCfg.length; i++) {
|
|
3976
|
+
const comp = this.compCfg[i];
|
|
3977
|
+
if (!comp || !comp.Products) continue;
|
|
3978
|
+
for (let j = 0; j < comp.Products.length; j++) {
|
|
3979
|
+
const prod = comp.Products[j];
|
|
3980
|
+
if (!prod || !prod.Datasets) continue;
|
|
3981
|
+
for (let k = 0; k < prod.Datasets.length; k++) {
|
|
3982
|
+
const ds = prod.Datasets[k];
|
|
3983
|
+
if (ds && ds.DatasetId === datasetId) {
|
|
3984
|
+
const info =
|
|
3985
|
+
ds.dataset_download_information ||
|
|
3986
|
+
ds.DatasetDownloadInformation ||
|
|
3987
|
+
{};
|
|
3988
|
+
if (info && info.items && info.items[0]) {
|
|
3989
|
+
byoc = info.items[0].byoc_collection || byoc;
|
|
3990
|
+
}
|
|
3991
|
+
break;
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
|
|
3919
3999
|
if (byoc && this.props.fetchCatalogApiDates) {
|
|
3920
4000
|
let payload =
|
|
3921
4001
|
this.props.catalogapi &&
|
|
@@ -3937,7 +4017,7 @@ class MenuWidget extends React.Component {
|
|
|
3937
4017
|
BBoxes = await this.parseBBOXMAPSERVER(this.layers[elem.id]);
|
|
3938
4018
|
} else if (this.url?.toLowerCase().includes('wms') || serviceLayer) {
|
|
3939
4019
|
await this.getCapabilities(this.url, 'wms');
|
|
3940
|
-
this.parseBBOXWMS(this.xml);
|
|
4020
|
+
BBoxes = this.parseBBOXWMS(this.xml);
|
|
3941
4021
|
} else if (this.url?.toLowerCase().includes('wmts')) {
|
|
3942
4022
|
await this.getCapabilities(this.url, 'wmts');
|
|
3943
4023
|
BBoxes = this.parseBBOXWMTS(this.xml);
|
|
@@ -3949,7 +4029,7 @@ class MenuWidget extends React.Component {
|
|
|
3949
4029
|
ymin: -20037508.342789,
|
|
3950
4030
|
xmax: 20037508.342789,
|
|
3951
4031
|
ymax: 20037508.342789,
|
|
3952
|
-
spatialReference: 3857,
|
|
4032
|
+
spatialReference: 3857,
|
|
3953
4033
|
});
|
|
3954
4034
|
} else {
|
|
3955
4035
|
myExtent = new Extent({
|
|
@@ -3957,36 +4037,9 @@ class MenuWidget extends React.Component {
|
|
|
3957
4037
|
ymin: BBoxes['dataset'].ymin,
|
|
3958
4038
|
xmax: BBoxes['dataset'].xmax,
|
|
3959
4039
|
ymax: BBoxes['dataset'].ymax,
|
|
3960
|
-
// spatialReference: 4326 // by default wkid 4326
|
|
3961
4040
|
});
|
|
3962
4041
|
}
|
|
3963
|
-
|
|
3964
|
-
const maxMppAllowed = 23628.54;
|
|
3965
|
-
const vw = this.view && this.view.width ? this.view.width : 0;
|
|
3966
|
-
const vh = this.view && this.view.height ? this.view.height : 0;
|
|
3967
|
-
let extentWM = myExtent;
|
|
3968
|
-
try {
|
|
3969
|
-
if (
|
|
3970
|
-
!(
|
|
3971
|
-
myExtent.spatialReference && myExtent.spatialReference.wkid === 3857
|
|
3972
|
-
)
|
|
3973
|
-
) {
|
|
3974
|
-
extentWM = WebMercatorUtils.geographicToWebMercator(myExtent);
|
|
3975
|
-
}
|
|
3976
|
-
} catch (e) {}
|
|
3977
|
-
if (vw > 0 && vh > 0) {
|
|
3978
|
-
const mppX = (extentWM.xmax - extentWM.xmin) / vw;
|
|
3979
|
-
const mppY = (extentWM.ymax - extentWM.ymin) / vh;
|
|
3980
|
-
const mpp = Math.max(mppX, mppY);
|
|
3981
|
-
if (mpp > maxMppAllowed) {
|
|
3982
|
-
const cx = (myExtent.xmin + myExtent.xmax) / 2;
|
|
3983
|
-
const cy = (myExtent.ymin + myExtent.ymax) / 2;
|
|
3984
|
-
this.view.goTo({ center: [cx, cy], zoom: 3 });
|
|
3985
|
-
return;
|
|
3986
|
-
}
|
|
3987
|
-
}
|
|
3988
|
-
}
|
|
3989
|
-
this.view.goTo(myExtent); //
|
|
4042
|
+
this.view.goTo(myExtent);
|
|
3990
4043
|
}
|
|
3991
4044
|
|
|
3992
4045
|
async fullExtent(elem) {
|
|
@@ -4008,7 +4061,10 @@ class MenuWidget extends React.Component {
|
|
|
4008
4061
|
let firstLayer;
|
|
4009
4062
|
let landCoverAndLandUseMapping = document.querySelector('#component_0');
|
|
4010
4063
|
let productIds = [];
|
|
4011
|
-
if (
|
|
4064
|
+
if (
|
|
4065
|
+
landCoverAndLandUseMapping &&
|
|
4066
|
+
landCoverAndLandUseMapping.contains(document.activeElement)
|
|
4067
|
+
) {
|
|
4012
4068
|
const productElements = landCoverAndLandUseMapping.querySelectorAll(
|
|
4013
4069
|
'.map-menu-product-dropdown',
|
|
4014
4070
|
);
|
|
@@ -4020,12 +4076,47 @@ class MenuWidget extends React.Component {
|
|
|
4020
4076
|
});
|
|
4021
4077
|
}
|
|
4022
4078
|
if (isCDSE) {
|
|
4023
|
-
|
|
4079
|
+
let d =
|
|
4024
4080
|
this.layers[elem.id]?.DatasetDownloadInformation ||
|
|
4025
4081
|
this.layers[elem.id]?.datasetDownloadInformation ||
|
|
4082
|
+
this.layers[elem.id]?.dataset_download_information ||
|
|
4026
4083
|
{};
|
|
4027
|
-
|
|
4028
|
-
|
|
4084
|
+
let byoc = d && d.items && d.items[0] ? d.items[0].byoc_collection : null;
|
|
4085
|
+
|
|
4086
|
+
if (!byoc) {
|
|
4087
|
+
let parentId = elem.getAttribute('parentid');
|
|
4088
|
+
let datasetInput = document.getElementById(parentId);
|
|
4089
|
+
let datasetContainer = datasetInput
|
|
4090
|
+
? datasetInput.closest('.map-menu-dataset-dropdown')
|
|
4091
|
+
: null;
|
|
4092
|
+
let datasetId = datasetContainer
|
|
4093
|
+
? datasetContainer.getAttribute('datasetid')
|
|
4094
|
+
: null;
|
|
4095
|
+
if (datasetId && this.compCfg && Array.isArray(this.compCfg)) {
|
|
4096
|
+
for (let i = 0; i < this.compCfg.length; i++) {
|
|
4097
|
+
const comp = this.compCfg[i];
|
|
4098
|
+
if (!comp || !comp.Products) continue;
|
|
4099
|
+
for (let j = 0; j < comp.Products.length; j++) {
|
|
4100
|
+
const prod = comp.Products[j];
|
|
4101
|
+
if (!prod || !prod.Datasets) continue;
|
|
4102
|
+
for (let k = 0; k < prod.Datasets.length; k++) {
|
|
4103
|
+
const ds = prod.Datasets[k];
|
|
4104
|
+
if (ds && ds.DatasetId === datasetId) {
|
|
4105
|
+
const info =
|
|
4106
|
+
ds.dataset_download_information ||
|
|
4107
|
+
ds.DatasetDownloadInformation ||
|
|
4108
|
+
{};
|
|
4109
|
+
if (info && info.items && info.items[0]) {
|
|
4110
|
+
byoc = info.items[0].byoc_collection || byoc;
|
|
4111
|
+
}
|
|
4112
|
+
break;
|
|
4113
|
+
}
|
|
4114
|
+
}
|
|
4115
|
+
}
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
|
|
4029
4120
|
if (byoc && this.props.fetchCatalogApiDates) {
|
|
4030
4121
|
let payload =
|
|
4031
4122
|
this.props.catalogapi &&
|
|
@@ -4044,13 +4135,12 @@ class MenuWidget extends React.Component {
|
|
|
4044
4135
|
}
|
|
4045
4136
|
return;
|
|
4046
4137
|
} else if (this.productId?.includes('333e4100b79045daa0ff16466ac83b7f')) {
|
|
4047
|
-
//global dynamic landCover
|
|
4048
4138
|
this.findDatasetBoundingBox(elem);
|
|
4049
4139
|
|
|
4050
4140
|
BBoxes = this.parseBBOXJSON(this.dataBBox);
|
|
4051
4141
|
} else if (
|
|
4052
|
-
this.productId?.includes('fe8209dffe13454891cea05998c8e456') ||
|
|
4053
|
-
this.productId?.includes('8914fde2241a4035818af8f0264fd55e')
|
|
4142
|
+
this.productId?.includes('fe8209dffe13454891cea05998c8e456') ||
|
|
4143
|
+
this.productId?.includes('8914fde2241a4035818af8f0264fd55e')
|
|
4054
4144
|
) {
|
|
4055
4145
|
if (
|
|
4056
4146
|
this.layers[elem.id].fullExtents &&
|
|
@@ -4063,7 +4153,7 @@ class MenuWidget extends React.Component {
|
|
|
4063
4153
|
ymin: -20037508.342789,
|
|
4064
4154
|
xmax: 20037508.342789,
|
|
4065
4155
|
ymax: 20037508.342789,
|
|
4066
|
-
spatialReference: 3857,
|
|
4156
|
+
spatialReference: 3857,
|
|
4067
4157
|
});
|
|
4068
4158
|
this.view.goTo(myExtent);
|
|
4069
4159
|
}
|
|
@@ -4090,7 +4180,6 @@ class MenuWidget extends React.Component {
|
|
|
4090
4180
|
firstLayer = BBoxes.dataset;
|
|
4091
4181
|
}
|
|
4092
4182
|
if (productIds?.includes(this.productId)) {
|
|
4093
|
-
// Your code here for when productIds includes this.productId
|
|
4094
4183
|
let str = elem.parentNode.outerHTML;
|
|
4095
4184
|
let match = str.match(/layerid="([a-zA-Z0-9_:-]+)"/);
|
|
4096
4185
|
let layerid = match ? match[1] : null;
|
|
@@ -4099,8 +4188,6 @@ class MenuWidget extends React.Component {
|
|
|
4099
4188
|
this.productId?.includes('130299ac96e54c30a12edd575eff80f7') &&
|
|
4100
4189
|
layerid.length <= 2
|
|
4101
4190
|
) {
|
|
4102
|
-
//let match = str.match(/layerid="(\d+)"/);
|
|
4103
|
-
//let layerid = match ? match[1] : null;
|
|
4104
4191
|
if (this.url?.toLowerCase().endsWith('mapserver')) {
|
|
4105
4192
|
switch (layerid) {
|
|
4106
4193
|
case '1':
|
|
@@ -4174,7 +4261,6 @@ class MenuWidget extends React.Component {
|
|
|
4174
4261
|
) {
|
|
4175
4262
|
firstLayer = BBoxes['all_present_lc_a_pol'];
|
|
4176
4263
|
} else if (serviceLayer) {
|
|
4177
|
-
// Full extent treatment for service layers
|
|
4178
4264
|
firstLayer = BBoxes['dataset'];
|
|
4179
4265
|
} else {
|
|
4180
4266
|
firstLayer = BBoxes[elem.attributes.layerid.value];
|
|
@@ -4185,9 +4271,8 @@ class MenuWidget extends React.Component {
|
|
|
4185
4271
|
ymin: firstLayer.ymin,
|
|
4186
4272
|
xmax: firstLayer.xmax,
|
|
4187
4273
|
ymax: firstLayer.ymax,
|
|
4188
|
-
// spatialReference: 4326 // by default wkid 4326
|
|
4189
4274
|
});
|
|
4190
|
-
this.view.goTo(myExtent);
|
|
4275
|
+
this.view.goTo(myExtent);
|
|
4191
4276
|
}
|
|
4192
4277
|
this.url = null;
|
|
4193
4278
|
}
|