@opengeoweb/webmap 19.6.1 → 20.0.0-nightly-20260919
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/dist/index.esm.js +12 -27
- package/package.json +35 -34
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { authFetch } from '@opengeoweb/authentication';
|
|
1
2
|
import { compact } from 'lodash';
|
|
2
3
|
import { PROJECTION, dateUtils } from '@opengeoweb/shared';
|
|
3
4
|
import { QueryClient } from '@tanstack/query-core';
|
|
@@ -713,8 +714,7 @@ var addBoundingBoxForLayer = function addBoundingBoxForLayer(layerObjectFromWMS)
|
|
|
713
714
|
* @returns Sorted array.
|
|
714
715
|
*/
|
|
715
716
|
function sortArrayOfObjectsByKey(array, key) {
|
|
716
|
-
|
|
717
|
-
return spreadArray.sort(function (arrayA, arrayB) {
|
|
717
|
+
return [].concat(array).sort(function (arrayA, arrayB) {
|
|
718
718
|
var x = arrayA[key];
|
|
719
719
|
var y = arrayB[key];
|
|
720
720
|
if (x < y) {
|
|
@@ -745,10 +745,13 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
|
|
|
745
745
|
if (nestedLayerPath === void 0) {
|
|
746
746
|
nestedLayerPath = [];
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
// geographicBoundingBox and styles resolve nearest-parent-first, so reduce over
|
|
749
|
+
// a reversed copy of nestedLayerPath without mutating the original parameter
|
|
750
|
+
var reversedLayerPath = nestedLayerPath.slice().reverse();
|
|
751
|
+
var geographicBoundingBox = reversedLayerPath.reduce(function (npath, lprops) {
|
|
749
752
|
return npath || lprops.geographicBoundingBox;
|
|
750
753
|
}, addBoundingBoxForLayer(layer));
|
|
751
|
-
var dimensions = nestedLayerPath.
|
|
754
|
+
var dimensions = nestedLayerPath.reduce(function (dims, props) {
|
|
752
755
|
var parentDims = (props.dimensions || []).filter(function (dim) {
|
|
753
756
|
return !dims.some(function (dimit) {
|
|
754
757
|
return dimit.name === dim.name;
|
|
@@ -756,7 +759,7 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
|
|
|
756
759
|
});
|
|
757
760
|
return [].concat(parentDims, dims);
|
|
758
761
|
}, addDimensionsForLayer(layer));
|
|
759
|
-
var styles =
|
|
762
|
+
var styles = reversedLayerPath.reduce(function (npath, lprops) {
|
|
760
763
|
if (lprops.styles && Array.isArray(lprops.styles) && lprops.styles.length) {
|
|
761
764
|
return lprops.styles.concat(npath);
|
|
762
765
|
}
|
|
@@ -1061,7 +1064,7 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
1061
1064
|
cache: 'default'
|
|
1062
1065
|
};
|
|
1063
1066
|
var request = new Request(url);
|
|
1064
|
-
|
|
1067
|
+
authFetch(request, options).then(function (response) {
|
|
1065
1068
|
_this3._setMaxAgeFromResponseHeaders(response);
|
|
1066
1069
|
response.blob().then(function (imageBlob) {
|
|
1067
1070
|
_this3.el.src = URL.createObjectURL(imageBlob);
|
|
@@ -1262,7 +1265,7 @@ var WMImageStore = /*#__PURE__*/function () {
|
|
|
1262
1265
|
return [];
|
|
1263
1266
|
}
|
|
1264
1267
|
// Clean the set, only keep the most recent images
|
|
1265
|
-
var imagesbyGeoRefArraySortByImageLife = imagesbyGeoRefArray.sort(function (imageA, imageB) {
|
|
1268
|
+
var imagesbyGeoRefArraySortByImageLife = imagesbyGeoRefArray.slice().sort(function (imageA, imageB) {
|
|
1266
1269
|
if (imageA.imageLife > imageB.imageLife) {
|
|
1267
1270
|
return -1;
|
|
1268
1271
|
}
|
|
@@ -1329,8 +1332,7 @@ var WMImageStore = /*#__PURE__*/function () {
|
|
|
1329
1332
|
// We have to reuse an image
|
|
1330
1333
|
var imagesAsList = Array.from(this.imagesbysrc.values()).filter(function (imageBySrc) {
|
|
1331
1334
|
return !imageBySrc || !imageBySrc.isLoading() || imageBySrc.hasError();
|
|
1332
|
-
})
|
|
1333
|
-
imagesAsList.sort(function (imageA, imageB) {
|
|
1335
|
+
}).sort(function (imageA, imageB) {
|
|
1334
1336
|
if (imageA.imageLife < imageB.imageLife) {
|
|
1335
1337
|
return -1;
|
|
1336
1338
|
}
|
|
@@ -2388,23 +2390,6 @@ function init(){
|
|
|
2388
2390
|
}
|
|
2389
2391
|
*/
|
|
2390
2392
|
|
|
2391
|
-
/* *
|
|
2392
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2393
|
-
* you may not use this file except in compliance with the License.
|
|
2394
|
-
* You may obtain a copy of the License at
|
|
2395
|
-
*
|
|
2396
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2397
|
-
*
|
|
2398
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2399
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2400
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2401
|
-
* See the License for the specific language governing permissions and
|
|
2402
|
-
* limitations under the License.
|
|
2403
|
-
*
|
|
2404
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2405
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
2406
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2407
|
-
* */
|
|
2408
2393
|
var WMXMLStringToXMLDocument = function WMXMLStringToXMLDocument(xmlString) {
|
|
2409
2394
|
var xmlData = new DOMParser().parseFromString(xmlString, 'text/xml');
|
|
2410
2395
|
if (xmlData.documentElement.nodeName === 'parsererror') {
|
|
@@ -2477,7 +2462,7 @@ var WMXMLParser = function WMXMLParser(url, headers) {
|
|
|
2477
2462
|
fetchHeaders.append(header.name, header.value);
|
|
2478
2463
|
}
|
|
2479
2464
|
}
|
|
2480
|
-
|
|
2465
|
+
authFetch(url, {
|
|
2481
2466
|
method: 'GET',
|
|
2482
2467
|
mode: 'cors',
|
|
2483
2468
|
cache: 'no-cache',
|
package/package.json
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
"name": "@opengeoweb/webmap",
|
|
3
|
+
"version": "20.0.0-nightly-20260919",
|
|
4
|
+
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.esm.js",
|
|
11
|
+
"module": "./dist/index.esm.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
".": {
|
|
16
|
+
"@opengeoweb/source": "./src/index.ts",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.esm.js",
|
|
19
|
+
"default": "./dist/index.esm.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@opengeoweb/shared": "20.0.0-nightly-20260919",
|
|
24
|
+
"@opengeoweb/authentication": "20.0.0-nightly-20260919",
|
|
25
|
+
"@tanstack/query-core": "^5.69.2",
|
|
26
|
+
"lodash": "^4.18.1",
|
|
27
|
+
"i18next": "^25.0.1",
|
|
28
|
+
"@types/geojson": "^7946.0.14"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"!dist/package.json",
|
|
33
|
+
"README.md",
|
|
34
|
+
"package.json"
|
|
35
|
+
]
|
|
36
|
+
}
|