@eeacms/volto-arcgis-block 0.1.131 → 0.1.133
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,18 @@ 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.133](https://github.com/eea/volto-arcgis-block/compare/0.1.132...0.1.133) - 2 May 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- CLMS-1733 (lint):Ran linting scripts before push [Urkorue - [`796f9c3`](https://github.com/eea/volto-arcgis-block/commit/796f9c3880fff8d069d0457b6a32c85cdf99dac3)]
|
|
12
|
+
- CLMS-1733 (lint):Ran linting scripts before push [Urkorue - [`58f5035`](https://github.com/eea/volto-arcgis-block/commit/58f50350cd062d08b1fa0d081853a0be5f5bb4a2)]
|
|
13
|
+
- CLMS-1733 (fix): Full extend works well with Corine Land Cover and Vito datasets [Urkorue - [`e84e9b5`](https://github.com/eea/volto-arcgis-block/commit/e84e9b5045c061e8398c83a8fc4314479281cf3b)]
|
|
14
|
+
### [0.1.132](https://github.com/eea/volto-arcgis-block/compare/0.1.131...0.1.132) - 26 April 2023
|
|
15
|
+
|
|
16
|
+
#### :hammer_and_wrench: Others
|
|
17
|
+
|
|
18
|
+
- CLMS-1733 (fix): Full extend works well with snow and ice parameters datasets [Urkorue - [`510be6a`](https://github.com/eea/volto-arcgis-block/commit/510be6ac35287248f86399f63cfc10cd57737667)]
|
|
7
19
|
### [0.1.131](https://github.com/eea/volto-arcgis-block/compare/0.1.130...0.1.131) - 26 April 2023
|
|
8
20
|
|
|
9
21
|
### [0.1.130](https://github.com/eea/volto-arcgis-block/compare/0.1.129...0.1.130) - 25 April 2023
|
package/package.json
CHANGED
|
@@ -380,6 +380,8 @@ class MenuWidget extends React.Component {
|
|
|
380
380
|
if (
|
|
381
381
|
snowAndIce === null ||
|
|
382
382
|
snowAndIce === undefined ||
|
|
383
|
+
snowAndIce.offsetParent === undefined ||
|
|
384
|
+
snowAndIce.offsetParent === null ||
|
|
383
385
|
snowAndIce.offsetParent.nextSibling === undefined ||
|
|
384
386
|
snowAndIce.offsetParent.nextSibling === null
|
|
385
387
|
)
|
|
@@ -2007,14 +2009,16 @@ class MenuWidget extends React.Component {
|
|
|
2007
2009
|
} // function parseWMS
|
|
2008
2010
|
// Web Map Tiled Services WMTS
|
|
2009
2011
|
parseBBOXWMTS(xml) {
|
|
2012
|
+
let BBoxes = {};
|
|
2013
|
+
let layersChildren = null;
|
|
2014
|
+
let layerParent = null;
|
|
2010
2015
|
const layerParentNode = xml.querySelectorAll('Layer');
|
|
2011
|
-
|
|
2016
|
+
layersChildren = Array.from(layerParentNode).filter(
|
|
2012
2017
|
(v) => v.querySelectorAll('Layer').length === 0,
|
|
2013
2018
|
);
|
|
2014
|
-
|
|
2019
|
+
layerParent = Array.from(layerParentNode).filter(
|
|
2015
2020
|
(v) => v.querySelectorAll('Layer').length !== 0,
|
|
2016
2021
|
);
|
|
2017
|
-
let BBoxes = {};
|
|
2018
2022
|
for (let i in layersChildren) {
|
|
2019
2023
|
let LowerCorner,
|
|
2020
2024
|
UpperCorner = [];
|
|
@@ -2031,7 +2035,9 @@ class MenuWidget extends React.Component {
|
|
|
2031
2035
|
layersChildren[i],
|
|
2032
2036
|
'ows:UpperCorner',
|
|
2033
2037
|
)[0].innerText.split(' ');
|
|
2034
|
-
} else
|
|
2038
|
+
} else if (
|
|
2039
|
+
this.parseCapabilities(layerParent, 'ows:LowerCorner').length !== 0
|
|
2040
|
+
) {
|
|
2035
2041
|
// If the layer has no BBOX, it was assigned dataset BBOX
|
|
2036
2042
|
LowerCorner = this.parseCapabilities(
|
|
2037
2043
|
layerParent,
|
|
@@ -2077,24 +2083,57 @@ class MenuWidget extends React.Component {
|
|
|
2077
2083
|
.catch(() => {});
|
|
2078
2084
|
};
|
|
2079
2085
|
async fullExtent(elem) {
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2086
|
+
let parentId = elem.getAttribute('parentid');
|
|
2087
|
+
if (
|
|
2088
|
+
parentId.includes('map_dataset_2_4') ||
|
|
2089
|
+
parentId.includes('map_dataset_2_3')
|
|
2090
|
+
) {
|
|
2091
|
+
this.view.goTo(this.layers[elem.id].fullExtents[0]);
|
|
2092
|
+
} else {
|
|
2093
|
+
this.findCheckedDataset(elem);
|
|
2094
|
+
let BBoxes = {};
|
|
2095
|
+
let firstLayer;
|
|
2096
|
+
if (this.url.toLowerCase().includes('wms')) {
|
|
2097
|
+
await this.getCapabilities(this.url, 'wms');
|
|
2098
|
+
BBoxes = this.parseBBOXWMS(this.xml);
|
|
2099
|
+
} else if (this.url.toLowerCase().includes('wmts')) {
|
|
2100
|
+
await this.getCapabilities(this.url, 'wmts');
|
|
2101
|
+
BBoxes = this.parseBBOXWMTS(this.xml);
|
|
2102
|
+
}
|
|
2103
|
+
if (elem.title.includes('Corine Land Cover')) {
|
|
2104
|
+
if (elem.title.includes('Guadeloupe')) {
|
|
2105
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[0]];
|
|
2106
|
+
} else if (elem.title.includes('French Guiana')) {
|
|
2107
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[1]];
|
|
2108
|
+
} else if (elem.title.includes('Martinique')) {
|
|
2109
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[2]];
|
|
2110
|
+
} else if (elem.title.includes('Mayotte')) {
|
|
2111
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[3]];
|
|
2112
|
+
} else if (elem.title.includes('Reunion')) {
|
|
2113
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[4]];
|
|
2114
|
+
} else {
|
|
2115
|
+
firstLayer =
|
|
2116
|
+
BBoxes[Object.keys(BBoxes)[Object.keys(BBoxes).length - 1]];
|
|
2117
|
+
}
|
|
2118
|
+
} else if (
|
|
2119
|
+
elem.id.includes('all_present') ||
|
|
2120
|
+
elem.id.includes('all_lcc') ||
|
|
2121
|
+
elem.id.includes('cop_klc') ||
|
|
2122
|
+
elem.id.includes('protected_areas')
|
|
2123
|
+
) {
|
|
2124
|
+
firstLayer = BBoxes['all_present_lc_a_pol'];
|
|
2125
|
+
} else {
|
|
2126
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[0]];
|
|
2127
|
+
}
|
|
2128
|
+
let myExtent = new Extent({
|
|
2129
|
+
xmin: firstLayer.xmin,
|
|
2130
|
+
ymin: firstLayer.ymin,
|
|
2131
|
+
xmax: firstLayer.xmax,
|
|
2132
|
+
ymax: firstLayer.ymax,
|
|
2133
|
+
// spatialReference: 4326 // by default wkid 4326
|
|
2134
|
+
});
|
|
2135
|
+
this.view.goTo(myExtent);
|
|
2088
2136
|
}
|
|
2089
|
-
const firstLayer = BBoxes[Object.keys(BBoxes)[0]];
|
|
2090
|
-
let myExtent = new Extent({
|
|
2091
|
-
xmin: firstLayer.xmin,
|
|
2092
|
-
ymin: firstLayer.ymin,
|
|
2093
|
-
xmax: firstLayer.xmax,
|
|
2094
|
-
ymax: firstLayer.ymax,
|
|
2095
|
-
// spatialReference: 4326 // by default wkid 4326
|
|
2096
|
-
});
|
|
2097
|
-
this.view.goTo(myExtent);
|
|
2098
2137
|
}
|
|
2099
2138
|
/**
|
|
2100
2139
|
* Method to show Active Layers of the map
|