@opengeoweb/webmap 4.3.0 → 4.5.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/index.esm.js CHANGED
@@ -3411,7 +3411,24 @@ var WMJSDimension = /*#__PURE__*/function () {
3411
3411
  key: "getDimInterval",
3412
3412
  value: function getDimInterval() {
3413
3413
  this.initialize();
3414
- return this.dimTimeInterval;
3414
+ if (!this.dimTimeInterval) return undefined;
3415
+ var _this$dimTimeInterval = this.dimTimeInterval,
3416
+ year = _this$dimTimeInterval.year,
3417
+ month = _this$dimTimeInterval.month,
3418
+ day = _this$dimTimeInterval.day,
3419
+ hour = _this$dimTimeInterval.hour,
3420
+ minute = _this$dimTimeInterval.minute,
3421
+ second = _this$dimTimeInterval.second,
3422
+ isRegularInterval = _this$dimTimeInterval.isRegularInterval;
3423
+ return {
3424
+ year: year,
3425
+ month: month,
3426
+ day: day,
3427
+ hour: hour,
3428
+ minute: minute,
3429
+ second: second,
3430
+ isRegularInterval: isRegularInterval
3431
+ };
3415
3432
  }
3416
3433
  /**
3417
3434
  * Shorthand functionf or getValueForIndex
@@ -4014,6 +4031,10 @@ var getErrorsToDisplay = function getErrorsToDisplay(canvasErrors, getLayerBySer
4014
4031
  return list;
4015
4032
  }, []);
4016
4033
  };
4034
+ var clearImageCache = function clearImageCache() {
4035
+ getMapImageStore.clear();
4036
+ getLegendImageStore().clear();
4037
+ };
4017
4038
  /**
4018
4039
  /**
4019
4040
  * WMJSMap class
@@ -7531,6 +7552,7 @@ var WMXMLParser = function WMXMLParser(url, headers) {
7531
7552
  fetch(url, {
7532
7553
  method: 'GET',
7533
7554
  mode: 'cors',
7555
+ cache: 'no-cache',
7534
7556
  headers: fetchHeaders
7535
7557
  }).then(function (response) {
7536
7558
  var contentType = response.headers.get('content-type');
@@ -9226,4 +9248,4 @@ var WMLayer = /*#__PURE__*/function () {
9226
9248
  return WMLayer;
9227
9249
  }();
9228
9250
 
9229
- export { DateInterval, DebugType, I18n, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMGetServiceFromStore, WMImage, WMImageEventType, WMJSDimension, WMJSMap, WMJSService, WMJScheckURL, WMLayer, WMTimer, debug, getLegendGraphicURLForLayer, getMapImageStore, isDefined, legendImageStore, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, toArray };
9251
+ export { DateInterval, DebugType, I18n, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMGetServiceFromStore, WMImage, WMImageEventType, WMJSDimension, WMJSMap, WMJSService, WMJScheckURL, WMLayer, WMTimer, clearImageCache, debug, getLegendGraphicURLForLayer, getMapImageStore, isDefined, legendImageStore, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, toArray };
package/index.umd.js CHANGED
@@ -3440,7 +3440,24 @@
3440
3440
 
3441
3441
  WMJSDimension.prototype.getDimInterval = function () {
3442
3442
  this.initialize();
3443
- return this.dimTimeInterval;
3443
+ if (!this.dimTimeInterval) return undefined;
3444
+ var _a = this.dimTimeInterval,
3445
+ year = _a.year,
3446
+ month = _a.month,
3447
+ day = _a.day,
3448
+ hour = _a.hour,
3449
+ minute = _a.minute,
3450
+ second = _a.second,
3451
+ isRegularInterval = _a.isRegularInterval;
3452
+ return {
3453
+ year: year,
3454
+ month: month,
3455
+ day: day,
3456
+ hour: hour,
3457
+ minute: minute,
3458
+ second: second,
3459
+ isRegularInterval: isRegularInterval
3460
+ };
3444
3461
  };
3445
3462
  /**
3446
3463
  * Shorthand functionf or getValueForIndex
@@ -4070,6 +4087,10 @@
4070
4087
  return list;
4071
4088
  }, []);
4072
4089
  };
4090
+ var clearImageCache = function clearImageCache() {
4091
+ getMapImageStore.clear();
4092
+ getLegendImageStore().clear();
4093
+ };
4073
4094
  /**
4074
4095
  /**
4075
4096
  * WMJSMap class
@@ -7471,6 +7492,7 @@
7471
7492
  fetch(url, {
7472
7493
  method: 'GET',
7473
7494
  mode: 'cors',
7495
+ cache: 'no-cache',
7474
7496
  headers: fetchHeaders
7475
7497
  }).then(function (response) {
7476
7498
  var contentType = response.headers.get('content-type');
@@ -9193,6 +9215,7 @@
9193
9215
  exports.WMJScheckURL = WMJScheckURL;
9194
9216
  exports.WMLayer = WMLayer;
9195
9217
  exports.WMTimer = WMTimer;
9218
+ exports.clearImageCache = clearImageCache;
9196
9219
  exports.debug = debug;
9197
9220
  exports.getLegendGraphicURLForLayer = getLegendGraphicURLForLayer;
9198
9221
  exports.getMapImageStore = getMapImageStore;
@@ -1,4 +1,4 @@
1
- import { DateInterval } from './WMTime';
1
+ import { TimeInterval } from './types';
2
2
  interface WMJSDimensionConfig {
3
3
  name?: string;
4
4
  units?: string;
@@ -67,7 +67,7 @@ export default class WMJSDimension {
67
67
  * Hint about the timestep size / time resolution of this dimension.
68
68
  * @returns The dimTimeInterval
69
69
  */
70
- getDimInterval(): DateInterval;
70
+ getDimInterval(): TimeInterval | undefined;
71
71
  /**
72
72
  * Shorthand functionf or getValueForIndex
73
73
  */
@@ -7,6 +7,7 @@ import { LinkedInfo } from './types';
7
7
  export declare const detectLeftButton: (evt: MouseEvent) => boolean;
8
8
  export declare const detectRightButton: (evt: MouseEvent) => boolean;
9
9
  export declare const getErrorsToDisplay: (canvasErrors: LinkedInfo[], getLayerByServiceAndName: (layerservice: string, layername: string) => WMLayer) => string[];
10
+ export declare const clearImageCache: () => void;
10
11
  /**
11
12
  /**
12
13
  * WMJSMap class
@@ -1,4 +1,4 @@
1
- import WMJSMap from './WMJSMap';
1
+ import WMJSMap, { clearImageCache } from './WMJSMap';
2
2
  import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debug, DebugType } from './WMJSTools';
3
3
  import WMLayer, { LayerOptions, LayerType } from './WMLayer';
4
4
  import WMTimer from './WMTimer';
@@ -12,7 +12,7 @@ import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
12
12
  import { getMapImageStore, WMImageEventType } from './WMImageStore';
13
13
  import { WMJSService } from './WMJSService';
14
14
  import WMJSDimension from './WMJSDimension';
15
- export { WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMLayer, LayerType, WMTimer, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, parseISO8601DateToDate, I18n, WMBBOX, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debug, DebugType, WMImageEventType, WMJSService, getMapImageStore, WMJSDimension, };
15
+ export { WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMLayer, LayerType, WMTimer, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, parseISO8601DateToDate, I18n, WMBBOX, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debug, DebugType, WMImageEventType, WMJSService, getMapImageStore, WMJSDimension, clearImageCache, };
16
16
  export type { LayerOptions };
17
17
  export * from './types';
18
18
  export * from './WMTimeTypes';
@@ -12,6 +12,15 @@ export declare type LinkedInfoContent = {
12
12
  export declare type LinkedInfo = {
13
13
  linkedInfo: LinkedInfoContent;
14
14
  };
15
+ export declare type TimeInterval = {
16
+ year: number;
17
+ month: number;
18
+ day: number;
19
+ hour: number;
20
+ minute: number;
21
+ second: number;
22
+ isRegularInterval: boolean;
23
+ };
15
24
  export declare type Dimension = {
16
25
  name?: string;
17
26
  units?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {