@eeacms/volto-arcgis-block 0.1.339 → 0.1.341
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 +7 -0
- package/package.json +1 -1
- package/src/components/MapViewer/MenuWidget.jsx +92 -65
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ 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.341](https://github.com/eea/volto-arcgis-block/compare/0.1.340...0.1.341) - 6 March 2025
|
|
8
|
+
|
|
9
|
+
### [0.1.340](https://github.com/eea/volto-arcgis-block/compare/0.1.339...0.1.340) - 5 March 2025
|
|
10
|
+
|
|
11
|
+
#### :hammer_and_wrench: Others
|
|
12
|
+
|
|
13
|
+
- CLMS-285047 (bug): Refactored metodProcessLayer method to modify view service correctly [Unai Bolivar - [`05d7f66`](https://github.com/eea/volto-arcgis-block/commit/05d7f66b486933baef255113a59deefdeca59f1f)]
|
|
7
14
|
### [0.1.339](https://github.com/eea/volto-arcgis-block/compare/0.1.338...0.1.339) - 3 March 2025
|
|
8
15
|
|
|
9
16
|
### [0.1.338](https://github.com/eea/volto-arcgis-block/compare/0.1.337...0.1.338) - 18 February 2025
|
package/package.json
CHANGED
|
@@ -1737,8 +1737,8 @@ class MenuWidget extends React.Component {
|
|
|
1737
1737
|
});
|
|
1738
1738
|
//iterate sublayers fetching all sublayer data
|
|
1739
1739
|
} else if (viewService?.toLowerCase().includes('wms')) {
|
|
1740
|
-
viewService = viewService?.
|
|
1741
|
-
? viewService
|
|
1740
|
+
viewService = viewService?.includes('?')
|
|
1741
|
+
? viewService + '&'
|
|
1742
1742
|
: viewService + '?';
|
|
1743
1743
|
this.layers[layer.LayerId + '_' + inheritedIndexLayer] = new WMSLayer({
|
|
1744
1744
|
url: viewService,
|
|
@@ -1769,7 +1769,9 @@ class MenuWidget extends React.Component {
|
|
|
1769
1769
|
});
|
|
1770
1770
|
} else if (viewService?.toLowerCase().includes('wmts')) {
|
|
1771
1771
|
this.layers[layer.LayerId + '_' + inheritedIndexLayer] = new WMTSLayer({
|
|
1772
|
-
url: viewService?.
|
|
1772
|
+
url: viewService?.includes('?')
|
|
1773
|
+
? viewService + '&'
|
|
1774
|
+
: viewService + '?',
|
|
1773
1775
|
//id: layer.LayerId,
|
|
1774
1776
|
title: '',
|
|
1775
1777
|
_wmtsTitle: layer.Title, // CLMS-1105
|
|
@@ -2929,6 +2931,19 @@ class MenuWidget extends React.Component {
|
|
|
2929
2931
|
this.findCheckedDataset(elem);
|
|
2930
2932
|
let BBoxes = {};
|
|
2931
2933
|
let firstLayer;
|
|
2934
|
+
let landCoverAndLandUseMapping = document.querySelector('#component_0');
|
|
2935
|
+
let productIds = [];
|
|
2936
|
+
if (landCoverAndLandUseMapping) {
|
|
2937
|
+
const productElements = landCoverAndLandUseMapping.querySelectorAll(
|
|
2938
|
+
'.map-menu-product-dropdown',
|
|
2939
|
+
);
|
|
2940
|
+
productElements.forEach((productElement) => {
|
|
2941
|
+
const productId = productElement.getAttribute('productid');
|
|
2942
|
+
if (productId) {
|
|
2943
|
+
productIds.push(productId);
|
|
2944
|
+
}
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2932
2947
|
|
|
2933
2948
|
if (this.productId.includes('333e4100b79045daa0ff16466ac83b7f')) {
|
|
2934
2949
|
//global dynamic landCover
|
|
@@ -2936,7 +2951,7 @@ class MenuWidget extends React.Component {
|
|
|
2936
2951
|
|
|
2937
2952
|
BBoxes = this.parseBBOXJSON(this.dataBBox);
|
|
2938
2953
|
} else if (
|
|
2939
|
-
this.productId.includes('fe8209dffe13454891cea05998c8e456') || //Low Resolution Vegetation Parameters
|
|
2954
|
+
this.productId.includes('fe8209dffe13454891cea05998c8e456') || // Low Resolution Vegetation Parameters
|
|
2940
2955
|
this.productId.includes('8914fde2241a4035818af8f0264fd55e') // Water Parameters
|
|
2941
2956
|
) {
|
|
2942
2957
|
if (
|
|
@@ -2975,68 +2990,83 @@ class MenuWidget extends React.Component {
|
|
|
2975
2990
|
this.location.search !== ''
|
|
2976
2991
|
) {
|
|
2977
2992
|
firstLayer = BBoxes.dataset;
|
|
2978
|
-
}
|
|
2993
|
+
}
|
|
2994
|
+
if (productIds.includes(this.productId)) {
|
|
2995
|
+
// Your code here for when productIds includes this.productId
|
|
2979
2996
|
let str = elem.parentNode.outerHTML;
|
|
2980
|
-
let match = str.match(/layerid="(
|
|
2997
|
+
let match = str.match(/layerid="([a-zA-Z0-9_:-]+)"/);
|
|
2981
2998
|
let layerid = match ? match[1] : null;
|
|
2982
2999
|
if (layerid === null || layerid === undefined) return;
|
|
2983
|
-
if (
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
firstLayer = BBoxes[Object.keys(BBoxes)[1]];
|
|
3031
|
-
} else if (layerid === '3' || layerid === '9') {
|
|
3032
|
-
firstLayer = BBoxes[Object.keys(BBoxes)[2]];
|
|
3033
|
-
} else if (layerid === '4' || layerid === '10') {
|
|
3034
|
-
firstLayer = BBoxes[Object.keys(BBoxes)[3]];
|
|
3035
|
-
} else if (layerid === '5' || layerid === '11') {
|
|
3036
|
-
firstLayer = BBoxes[Object.keys(BBoxes)[4]];
|
|
3000
|
+
if (
|
|
3001
|
+
this.productId.includes('130299ac96e54c30a12edd575eff80f7') &&
|
|
3002
|
+
layerid.length <= 2
|
|
3003
|
+
) {
|
|
3004
|
+
//let match = str.match(/layerid="(\d+)"/);
|
|
3005
|
+
//let layerid = match ? match[1] : null;
|
|
3006
|
+
if (this.url?.toLowerCase().endsWith('mapserver')) {
|
|
3007
|
+
switch (layerid) {
|
|
3008
|
+
case '1':
|
|
3009
|
+
firstLayer = this.findBBoxById(BBoxes, 13);
|
|
3010
|
+
break;
|
|
3011
|
+
case '2':
|
|
3012
|
+
firstLayer = this.findBBoxById(BBoxes, 12);
|
|
3013
|
+
break;
|
|
3014
|
+
case '3':
|
|
3015
|
+
firstLayer = this.findBBoxById(BBoxes, 11);
|
|
3016
|
+
break;
|
|
3017
|
+
case '4':
|
|
3018
|
+
firstLayer = this.findBBoxById(BBoxes, 10);
|
|
3019
|
+
break;
|
|
3020
|
+
case '5':
|
|
3021
|
+
firstLayer = this.findBBoxById(BBoxes, 9);
|
|
3022
|
+
break;
|
|
3023
|
+
case '7':
|
|
3024
|
+
firstLayer = this.findBBoxById(BBoxes, 7);
|
|
3025
|
+
break;
|
|
3026
|
+
case '8':
|
|
3027
|
+
firstLayer = this.findBBoxById(BBoxes, 6);
|
|
3028
|
+
break;
|
|
3029
|
+
case '9':
|
|
3030
|
+
firstLayer = this.findBBoxById(BBoxes, 5);
|
|
3031
|
+
break;
|
|
3032
|
+
case '10':
|
|
3033
|
+
firstLayer = this.findBBoxById(BBoxes, 4);
|
|
3034
|
+
break;
|
|
3035
|
+
case '11':
|
|
3036
|
+
firstLayer = this.findBBoxById(BBoxes, 3);
|
|
3037
|
+
break;
|
|
3038
|
+
case '12':
|
|
3039
|
+
firstLayer = this.findBBoxById(BBoxes, 0);
|
|
3040
|
+
break;
|
|
3041
|
+
case '13':
|
|
3042
|
+
firstLayer = this.findBBoxById(BBoxes, 1);
|
|
3043
|
+
break;
|
|
3044
|
+
default:
|
|
3045
|
+
return;
|
|
3046
|
+
}
|
|
3037
3047
|
} else {
|
|
3038
|
-
|
|
3048
|
+
if (layerid === '12' || layerid === '13') {
|
|
3049
|
+
firstLayer = BBoxes['dataset'];
|
|
3050
|
+
} else if (layerid === '1' || layerid === '7') {
|
|
3051
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[0]];
|
|
3052
|
+
} else if (layerid === '2' || layerid === '8') {
|
|
3053
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[1]];
|
|
3054
|
+
} else if (layerid === '3' || layerid === '9') {
|
|
3055
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[2]];
|
|
3056
|
+
} else if (layerid === '4' || layerid === '10') {
|
|
3057
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[3]];
|
|
3058
|
+
} else if (layerid === '5' || layerid === '11') {
|
|
3059
|
+
firstLayer = BBoxes[Object.keys(BBoxes)[4]];
|
|
3060
|
+
} else {
|
|
3061
|
+
firstLayer = BBoxes['dataset'];
|
|
3062
|
+
}
|
|
3039
3063
|
}
|
|
3064
|
+
} else if (layerid.length > 2) {
|
|
3065
|
+
firstLayer = BBoxes[layerid];
|
|
3066
|
+
} else if (
|
|
3067
|
+
this.productId.includes('333e4100b79045daa0ff16466ac83b7f')
|
|
3068
|
+
) {
|
|
3069
|
+
firstLayer = BBoxes[0];
|
|
3040
3070
|
}
|
|
3041
3071
|
} else if (
|
|
3042
3072
|
elem.id.includes('all_present') ||
|
|
@@ -3046,10 +3076,7 @@ class MenuWidget extends React.Component {
|
|
|
3046
3076
|
) {
|
|
3047
3077
|
firstLayer = BBoxes['all_present_lc_a_pol'];
|
|
3048
3078
|
} else {
|
|
3049
|
-
|
|
3050
|
-
if (this.productId.includes('333e4100b79045daa0ff16466ac83b7f')) {
|
|
3051
|
-
firstLayer = BBoxes[0];
|
|
3052
|
-
} else firstLayer = BBoxes[elem.attributes.layerid.value];
|
|
3079
|
+
firstLayer = BBoxes[elem.attributes.layerid.value];
|
|
3053
3080
|
}
|
|
3054
3081
|
|
|
3055
3082
|
let myExtent = new Extent({
|