@opengeoweb/webmap 20.2.0 → 21.0.0
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
|
@@ -1088,7 +1088,9 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
_this3._setMaxAgeFromResponseHeaders(response);
|
|
1090
1090
|
response.blob().then(function (imageBlob) {
|
|
1091
|
-
_this3.
|
|
1091
|
+
_this3._revokeObjectUrl();
|
|
1092
|
+
_this3._objectUrl = URL.createObjectURL(imageBlob);
|
|
1093
|
+
_this3.el.src = _this3._objectUrl;
|
|
1092
1094
|
})["catch"](function () {
|
|
1093
1095
|
// Do not log errors, as they are not very useful and can better be inspected via the network console
|
|
1094
1096
|
_this3._loadEvent(true);
|
|
@@ -1149,8 +1151,12 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
1149
1151
|
this._resolveAll();
|
|
1150
1152
|
(_this$loadEventCallba = this.loadEventCallback) == null || _this$loadEventCallba.call(this, this);
|
|
1151
1153
|
// Free up memory
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
+
this._revokeObjectUrl();
|
|
1155
|
+
};
|
|
1156
|
+
_proto._revokeObjectUrl = function _revokeObjectUrl() {
|
|
1157
|
+
if (this._objectUrl) {
|
|
1158
|
+
URL.revokeObjectURL(this._objectUrl);
|
|
1159
|
+
this._objectUrl = undefined;
|
|
1154
1160
|
}
|
|
1155
1161
|
};
|
|
1156
1162
|
_proto.getLoadDuration = function getLoadDuration() {
|
|
@@ -2241,15 +2247,14 @@ function getNumberOfTimeSteps(starttime, stoptime, interval) {
|
|
|
2241
2247
|
// In case of unequally distributed time steps, where the number of days leties within a month:
|
|
2242
2248
|
var testtime = starttime.clone();
|
|
2243
2249
|
var timestopms = stoptime.getTime();
|
|
2244
|
-
while (testtime.getTime()
|
|
2250
|
+
while (testtime.getTime() <= timestopms) {
|
|
2245
2251
|
testtime.add(interval);
|
|
2246
2252
|
steps += 1;
|
|
2247
2253
|
}
|
|
2248
|
-
steps += 1;
|
|
2249
2254
|
return steps;
|
|
2250
2255
|
}
|
|
2251
2256
|
// In case of equally distributed time steps
|
|
2252
|
-
steps = Math.
|
|
2257
|
+
steps = Math.floor((stoptime.getTime() - starttime.getTime()) / interval.getTime()) + 1;
|
|
2253
2258
|
return steps;
|
|
2254
2259
|
}
|
|
2255
2260
|
// Utility function to fill missing elements in ISO time range duration array
|
|
@@ -2348,7 +2353,8 @@ var ParseISOTimeRangeDuration = /*#__PURE__*/function () {
|
|
|
2348
2353
|
}
|
|
2349
2354
|
return this.timeSteps - 1;
|
|
2350
2355
|
}
|
|
2351
|
-
|
|
2356
|
+
var lastTimeStepDate = this.getDateAtTimeStep(this.timeSteps - 1);
|
|
2357
|
+
if (wantedTime > lastTimeStepDate.getTime()) {
|
|
2352
2358
|
return this.timeSteps - 1;
|
|
2353
2359
|
}
|
|
2354
2360
|
var timeStep = 0;
|
|
@@ -7141,4 +7147,4 @@ var privateWebMapUtils = {
|
|
|
7141
7147
|
QUERYWMS_GETCAPABILITIES: QUERYWMS_GETCAPABILITIES
|
|
7142
7148
|
};
|
|
7143
7149
|
|
|
7144
|
-
export { DateInterval, DebugType, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, LayerType, ParseISOTimeRangeDuration, WEBMAP_NAMESPACE, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMDateUnit, WMDefaultStyleName, WMEmptyLayerName, WMEmptyLayerTitle, WMImage, WMImageEventType, WMImageStore, WMImageStoreLoadType, WMInvalidDateValues, WMJSDimension, WMJSMAP_LONLAT_EPSGCODE, WMLayer, WMListener, WMProj4Defs, WMProjection, WMSVersion, WMXMLStringToJson, bgImageStoreLength, debugLogger, generateLayerId, generateMapId, generateTimesliderId, getCorrectWMSDimName, getLegendGraphicURLForLayer, getMapDimURL, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSTimeDimensionForLayerId, getWMLayerById, getWMSServiceId, handleDateUtilsISOString, invalidateWMSGetCapabilities, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapImageStoreLength, mockGetCapabilities, _parseISO8601DateToDate as parseISO8601DateToDate, parseISO8601IntervalToDateInterval, privateWebMapUtils, queryWMSGetCapabilities, queryWMSLayer, queryWMSLayers, queryWMSLayersTree, queryWMSServiceInfo, registerWMLayer, roundWithTimeStep, setWMSGetCapabilitiesFetcher, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, index as webmapTestSettings, webmapTranslations, utils as webmapUtils, wmDetermineDimensionMode, wmServiceListener, wmsQueryClient };
|
|
7150
|
+
export { DateInterval, DebugType, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, LayerType, ParseISOTimeRangeDuration, WEBMAP_NAMESPACE, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMDateUnit, WMDefaultStyleName, WMEmptyLayerName, WMEmptyLayerTitle, WMImage, WMImageEventType, WMImageStore, WMImageStoreLoadType, WMInvalidDateValues, WMJSDimension, WMJSMAP_LONLAT_EPSGCODE, WMLayer, WMListener, WMProj4Defs, WMProjection, WMSVersion, WMXMLStringToJson, bgImageStoreLength, debugLogger, generateLayerId, generateMapId, generateTimesliderId, getCorrectWMSDimName, getLegendGraphicURLForLayer, getMapDimURL, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSTimeDimensionForLayerId, getWMLayerById, getWMSServiceId, handleDateUtilsISOString, invalidateWMSGetCapabilities, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapImageStoreLength, mockGetCapabilities, _parseISO8601DateToDate as parseISO8601DateToDate, parseISO8601IntervalToDateInterval, privateWebMapUtils, queryOGCTypeWMSorWMTS, queryWMSGetCapabilities, queryWMSLayer, queryWMSLayers, queryWMSLayersTree, queryWMSServiceInfo, registerWMLayer, roundWithTimeStep, setWMSGetCapabilitiesFetcher, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, index as webmapTestSettings, webmapTranslations, utils as webmapUtils, wmDetermineDimensionMode, wmServiceListener, wmsQueryClient };
|
|
@@ -38,6 +38,7 @@ export default class WMImage {
|
|
|
38
38
|
_loadDuration?: number;
|
|
39
39
|
_maxAgeSeconds?: number | null;
|
|
40
40
|
_loadedAtTime?: number;
|
|
41
|
+
_objectUrl?: string;
|
|
41
42
|
_resolveList: ((i: WMImage) => void)[];
|
|
42
43
|
geoReference: WMGeoReference | null;
|
|
43
44
|
hashUrl: string | undefined;
|
|
@@ -105,6 +106,7 @@ export default class WMImage {
|
|
|
105
106
|
_getImageWithHeaders(url: string, headers: WMHeader[]): void;
|
|
106
107
|
_load(): void;
|
|
107
108
|
_loadEvent(hasError: boolean): void;
|
|
109
|
+
private _revokeObjectUrl;
|
|
108
110
|
getLoadDuration(): number | undefined;
|
|
109
111
|
/**
|
|
110
112
|
* Get the width of the current image
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { invalidateWMSGetCapabilities, queryWMSGetCapabilities, queryWMSLayersTree, queryWMSLayers, queryWMSServiceInfo, queryWMSLayer, } from '../../query/queryWMS';
|
|
1
|
+
export { invalidateWMSGetCapabilities, queryOGCTypeWMSorWMTS, queryWMSGetCapabilities, queryWMSLayersTree, queryWMSLayers, queryWMSServiceInfo, queryWMSLayer, } from '../../query/queryWMS';
|
|
2
2
|
export { wmsQueryClient } from './wmsQueryClient';
|
|
3
3
|
export { setWMSGetCapabilitiesFetcher } from './utils';
|
|
4
4
|
export { getWMSServiceId } from './getWMSServiceId';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/shared": "
|
|
24
|
-
"@opengeoweb/authentication": "
|
|
23
|
+
"@opengeoweb/shared": "21.0.0",
|
|
24
|
+
"@opengeoweb/authentication": "21.0.0",
|
|
25
25
|
"@tanstack/query-core": "^5.69.2",
|
|
26
26
|
"lodash": "^4.18.1",
|
|
27
27
|
"i18next": "^25.0.1",
|