@opengeoweb/webmap-react 20.0.1-nightly-20261011 → 20.0.1-nightly-20261014
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
CHANGED
|
@@ -420,6 +420,15 @@ function _defineProperty(e, r, t) {
|
|
|
420
420
|
writable: true
|
|
421
421
|
}) : e[r] = t, e;
|
|
422
422
|
}
|
|
423
|
+
function _get() {
|
|
424
|
+
return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
|
|
425
|
+
var p = _superPropBase(e, t);
|
|
426
|
+
if (p) {
|
|
427
|
+
var n = Object.getOwnPropertyDescriptor(p, t);
|
|
428
|
+
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
|
|
429
|
+
}
|
|
430
|
+
}, _get.apply(null, arguments);
|
|
431
|
+
}
|
|
423
432
|
function _getPrototypeOf(t) {
|
|
424
433
|
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
425
434
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
@@ -643,6 +652,16 @@ function _setPrototypeOf(t, e) {
|
|
|
643
652
|
function _slicedToArray(r, e) {
|
|
644
653
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
645
654
|
}
|
|
655
|
+
function _superPropBase(t, o) {
|
|
656
|
+
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
|
|
657
|
+
return t;
|
|
658
|
+
}
|
|
659
|
+
function _superPropGet(t, o, e, r) {
|
|
660
|
+
var p = _get(_getPrototypeOf(t.prototype ), o, e);
|
|
661
|
+
return "function" == typeof p ? function (t) {
|
|
662
|
+
return p.apply(e, t);
|
|
663
|
+
} : p;
|
|
664
|
+
}
|
|
646
665
|
function _toConsumableArray(r) {
|
|
647
666
|
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
648
667
|
}
|
|
@@ -699,6 +718,7 @@ var MAX_NUMBER_STEPS_IN_TIME_SLIDER_TO_PREFETCH = 10000;
|
|
|
699
718
|
var NUMBER_PREFETCH_WORKERS = 4;
|
|
700
719
|
var NUM_IMAGES_TO_CACHE = 10000;
|
|
701
720
|
var WMS_EXTENT_RATIO_TO_VIEWPORT = 1.2;
|
|
721
|
+
var FAILED_IMAGE_RETRY_CHECK_INTERVAL_MS = 10000;
|
|
702
722
|
var TIMEAWAREIMAGEWRAPPER_IMAGEDIDNOTLOADSUCCESFULLY = 'Image did not load succesfully';
|
|
703
723
|
// // To debug what dimensions are actually being used in the map, use:
|
|
704
724
|
// export const ADD_SHOW_DIMS_OPTION = true;
|
|
@@ -1140,6 +1160,7 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1140
1160
|
visible = _ref.visible;
|
|
1141
1161
|
_classCallCheck(this, TimeawareImageSource);
|
|
1142
1162
|
_this = _callSuper(this, TimeawareImageSource, [{}]);
|
|
1163
|
+
_this._failedImageRetryTimer = null;
|
|
1143
1164
|
_this._wmsUrl = wmsUrl;
|
|
1144
1165
|
_this._extraWMSParams = _objectSpread2({}, params);
|
|
1145
1166
|
_this._layerName = layerName;
|
|
@@ -1296,8 +1317,13 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1296
1317
|
var requestedImageHasWantedExtent = (this._loadedExtent && containsExtent$1(this._loadedExtent, requestExtent) || containsExtent$1(this._imWrapperForOlSource.getExtent(), requestExtent)) && (this._loadedResolution && fromResolutionLike(this._loadedResolution) === requestResolution || fromResolutionLike(this._imWrapperForOlSource.getResolution()) === requestResolution);
|
|
1297
1318
|
var hasExactImage = this._loadedExtent && this._imWrapperForOlSource.hasImage(this._loadedExtent, this._loadedResolution, pixelRatio, projection, this._wmsUrl, this._extraWMSParams, this._layerName, this._styleName, requestDimProperties);
|
|
1298
1319
|
if (hasExactImage && hasExactImage.isLoaded && requestedImageHasWantedExtent) {
|
|
1299
|
-
|
|
1300
|
-
|
|
1320
|
+
if (!hasExactImage.hasError) {
|
|
1321
|
+
this._imWrapperForOlSource.setGeoReferencedImage(hasExactImage);
|
|
1322
|
+
return this._imWrapperForOlSource;
|
|
1323
|
+
}
|
|
1324
|
+
// The image failed to load. Do not display the broken image, but check again later: the image is reloaded once it becomes stale.
|
|
1325
|
+
this._scheduleFailedImageRetry();
|
|
1326
|
+
return this._getAltImageOrEmpty(requestExtent, requestResolution, pixelRatio, projection, requestDimProperties);
|
|
1301
1327
|
}
|
|
1302
1328
|
this._lastRequestedExtent = requestExtent;
|
|
1303
1329
|
this._lastRequestedResolution = requestResolution;
|
|
@@ -1305,7 +1331,12 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1305
1331
|
this._lastRequestedProjection = projection;
|
|
1306
1332
|
this.throttledImageLoad();
|
|
1307
1333
|
// While we are loading, check if there is an alternative image available
|
|
1308
|
-
|
|
1334
|
+
return this._getAltImageOrEmpty(this._lastRequestedExtent, this._lastRequestedResolution, this._lastRequestedPixelRatio, this._lastRequestedProjection, requestDimProperties);
|
|
1335
|
+
}
|
|
1336
|
+
}, {
|
|
1337
|
+
key: "_getAltImageOrEmpty",
|
|
1338
|
+
value: function _getAltImageOrEmpty(extent, resolution, pixelRatio, projection, dimProperties) {
|
|
1339
|
+
var altImage = this._loadedExtent && this._imWrapperForOlSource.getAlternativeImage(extent, resolution, pixelRatio, projection, this._wmsUrl, this._extraWMSParams, this._layerName, this._styleName, dimProperties);
|
|
1309
1340
|
if (altImage && altImage.isLoaded) {
|
|
1310
1341
|
// A similar image is available for display, show it
|
|
1311
1342
|
this._imWrapperForAltImage.setGeoReferencedImage(altImage);
|
|
@@ -1314,6 +1345,28 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1314
1345
|
// This thing is has nothing to show yet.
|
|
1315
1346
|
return this._imWrapperEmptyButLoading;
|
|
1316
1347
|
}
|
|
1348
|
+
}, {
|
|
1349
|
+
key: "_scheduleFailedImageRetry",
|
|
1350
|
+
value: function _scheduleFailedImageRetry() {
|
|
1351
|
+
var _this4 = this;
|
|
1352
|
+
if (this._failedImageRetryTimer) {
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
this._failedImageRetryTimer = setTimeout(function () {
|
|
1356
|
+
_this4._failedImageRetryTimer = null;
|
|
1357
|
+
_this4.changed();
|
|
1358
|
+
}, FAILED_IMAGE_RETRY_CHECK_INTERVAL_MS);
|
|
1359
|
+
}
|
|
1360
|
+
}, {
|
|
1361
|
+
key: "disposeInternal",
|
|
1362
|
+
value: function disposeInternal() {
|
|
1363
|
+
if (this._failedImageRetryTimer) {
|
|
1364
|
+
clearTimeout(this._failedImageRetryTimer);
|
|
1365
|
+
this._failedImageRetryTimer = null;
|
|
1366
|
+
}
|
|
1367
|
+
this.cancelPrefetch();
|
|
1368
|
+
_superPropGet(TimeawareImageSource, "disposeInternal", this)([]);
|
|
1369
|
+
}
|
|
1317
1370
|
}, {
|
|
1318
1371
|
key: "setDimProps",
|
|
1319
1372
|
value: function setDimProps(params) {
|
|
@@ -6982,11 +7035,12 @@ var TimeawareImageSourceWMSLayer = function TimeawareImageSourceWMSLayer(_ref) {
|
|
|
6982
7035
|
// Assign olSource in wmlayer for metronome
|
|
6983
7036
|
wmLayer.olSource = olLayer === null || olLayer === void 0 ? void 0 : olLayer.getSource();
|
|
6984
7037
|
return function () {
|
|
6985
|
-
var
|
|
6986
|
-
|
|
7038
|
+
var olSource = olLayer.getSource();
|
|
7039
|
+
olSource === null || olSource === void 0 || olSource.cancelPrefetch();
|
|
6987
7040
|
wmLayer.olSource = null;
|
|
6988
7041
|
map.removeLayer(olLayer);
|
|
6989
7042
|
olLayer.dispose();
|
|
7043
|
+
olSource === null || olSource === void 0 || olSource.dispose();
|
|
6990
7044
|
};
|
|
6991
7045
|
// The dependency list should only contain the map, wmLayer, visible and dimensionValues. Other prop changes are handled by other effects.
|
|
6992
7046
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -38,6 +38,7 @@ export declare class TimeawareImageSource extends ImageSource {
|
|
|
38
38
|
private throttledPrefetch;
|
|
39
39
|
private throttledImageLoad;
|
|
40
40
|
private _layerId;
|
|
41
|
+
private _failedImageRetryTimer;
|
|
41
42
|
constructor({ wmsUrl, timeStampsToPrefetch, layerName, layerId, styleName, dimProps, params, visible, }: TimeawareImageSourceOptions);
|
|
42
43
|
private _conditionalPrefetch;
|
|
43
44
|
private _loadImagery;
|
|
@@ -45,6 +46,9 @@ export declare class TimeawareImageSource extends ImageSource {
|
|
|
45
46
|
triggerPrefetch(): void;
|
|
46
47
|
cancelPrefetch(): void;
|
|
47
48
|
getImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection): ImageWrapper;
|
|
49
|
+
private _getAltImageOrEmpty;
|
|
50
|
+
private _scheduleFailedImageRetry;
|
|
51
|
+
disposeInternal(): void;
|
|
48
52
|
setDimProps(params: Record<string, string>): void;
|
|
49
53
|
/**
|
|
50
54
|
* Check if an image is available and loaded for requested date. Used for showlayerinfo to proceed.
|
|
@@ -5,4 +5,5 @@ export declare const ENABLE_PREFETCH = true;
|
|
|
5
5
|
export declare const ADD_SHOW_DIMS_OPTION = false;
|
|
6
6
|
export declare const NUM_IMAGES_TO_CACHE = 10000;
|
|
7
7
|
export declare const WMS_EXTENT_RATIO_TO_VIEWPORT = 1.2;
|
|
8
|
+
export declare const FAILED_IMAGE_RETRY_CHECK_INTERVAL_MS = 10000;
|
|
8
9
|
export declare const TIMEAWAREIMAGEWRAPPER_IMAGEDIDNOTLOADSUCCESFULLY = "Image did not load succesfully";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "20.0.1-nightly-
|
|
3
|
+
"version": "20.0.1-nightly-20261014",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/webmap": "20.0.1-nightly-
|
|
24
|
-
"@opengeoweb/theme": "20.0.1-nightly-
|
|
25
|
-
"@opengeoweb/shared": "20.0.1-nightly-
|
|
23
|
+
"@opengeoweb/webmap": "20.0.1-nightly-20261014",
|
|
24
|
+
"@opengeoweb/theme": "20.0.1-nightly-20261014",
|
|
25
|
+
"@opengeoweb/shared": "20.0.1-nightly-20261014",
|
|
26
26
|
"lodash": "^4.18.1",
|
|
27
27
|
"ol": "^10.4.0",
|
|
28
28
|
"proj4": "^2.9.2",
|