@opengeoweb/webmap 7.0.0 → 8.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap",
3
- "version": "7.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -12,8 +12,9 @@
12
12
  "main": "./index.esm.js",
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
- "@opengeoweb/shared": "7.0.0",
15
+ "@opengeoweb/shared": "8.1.0",
16
16
  "date-fns": "2.30.0",
17
+ "immer": "9.0.21",
17
18
  "lodash": "4.17.21",
18
19
  "moment": "2.29.4",
19
20
  "proj4": "2.9.0",
@@ -1,6 +1,6 @@
1
1
  import type WMJSMap from './WMJSMap';
2
- import { AnimationList } from './types';
3
2
  export default class WMJSAnimate {
3
+ #private;
4
4
  private _map;
5
5
  private _divAnimationInfo;
6
6
  private _callBack;
@@ -8,12 +8,6 @@ export default class WMJSAnimate {
8
8
  private isNextTimeCloseToWallClockTime;
9
9
  constructor(_map: WMJSMap);
10
10
  isCurrentAnimationTimeCloseToWallClockTime(): boolean;
11
- _animate(): void;
12
- _animateLoop(): void;
13
- prefetchImagesForAnimationSteps(): void;
11
+ loopAnimation(): void;
14
12
  stopAnimating(): void;
15
- getRequestsForAnimationStep(animationSteps: AnimationList[], index: number): {
16
- url: string;
17
- headers: Headers[];
18
- }[];
19
13
  }
@@ -36,6 +36,7 @@ export default class WMImage {
36
36
  */
37
37
  isLoaded(): boolean;
38
38
  isLoadedWithoutErrors(): boolean;
39
+ hasNotStartedLoading(): boolean;
39
40
  /**
40
41
  * Returns true if the image is still loading
41
42
  */
@@ -17,6 +17,7 @@ export declare const clearImageCache: () => void;
17
17
  export default class WMJSMap {
18
18
  mapPin: MapPin;
19
19
  mapdimensions: WMJSDimension[];
20
+ timestepInMinutes: number | undefined;
20
21
  stopAnimating: () => void;
21
22
  showLayerInfo: boolean;
22
23
  isAnimating: boolean;
@@ -26,8 +27,6 @@ export default class WMJSMap {
26
27
  currentAnimationStep: number;
27
28
  initialAnimationStep: number;
28
29
  setAnimationDelay: (delay: number) => void;
29
- isAnimatingLoopRunning: boolean;
30
- checkAnimation: () => void;
31
30
  animateBusy: boolean;
32
31
  animationTimer: WMTimer;
33
32
  mouseHoverAnimationBox: boolean;
@@ -48,18 +47,18 @@ export default class WMJSMap {
48
47
  private layers;
49
48
  private baseLayers;
50
49
  private numBaseLayers;
51
- private _map;
52
- private renderer;
53
- private layersBusy;
54
- private mapBusy;
55
- private hasGeneratedId;
50
+ private _map?;
51
+ private renderer?;
52
+ private layersBusy?;
53
+ private mapBusy?;
54
+ private hasGeneratedId?;
56
55
  private divZoomBox;
57
56
  private divBoundingBox;
58
57
  private divDimInfo;
59
58
  private _displayLegendInMap;
60
59
  private bbox;
61
60
  updateBBOX: WMBBOX;
62
- private loadedBBOX;
61
+ private loadedBBOX?;
63
62
  drawnBBOX: WMBBOX;
64
63
  private divBuffer;
65
64
  private mapHeader;
@@ -90,7 +89,7 @@ export default class WMJSMap {
90
89
  private _resizeTimer;
91
90
  private wmAnimate;
92
91
  private wmTileRenderer;
93
- private loadingDivTimer;
92
+ private loadingDivTimer?;
94
93
  private mouseWheelBusy;
95
94
  private wMFlyToBBox;
96
95
  private mouseWheelEventBBOXCurrent;
@@ -114,7 +113,7 @@ export default class WMJSMap {
114
113
  private previousMouseButtonState;
115
114
  private longlat;
116
115
  private tileRenderSettings;
117
- private drawPending;
116
+ private drawPending?;
118
117
  private needsRedraw;
119
118
  private buildLayerDimsBusy;
120
119
  constructor(_element: HTMLElement);
@@ -302,6 +301,7 @@ export default class WMJSMap {
302
301
  resumeEvent(name: string): void;
303
302
  getDimensionList(): WMJSDimension[];
304
303
  getDimension(name: string): WMJSDimension;
304
+ setTimeDimension(value: string, triggerEvent: boolean): void;
305
305
  setDimension(name: string, value: string, triggerEvent?: boolean, adjustLayerDims?: boolean): void;
306
306
  zoomToLayer(_layer: WMLayer): void;
307
307
  setBBOX(left: number | WMBBOX, bottom?: number, right?: number, top?: number): boolean;
@@ -1,5 +1,5 @@
1
1
  import type WMJSMap from './WMJSMap';
2
- import WMLayer from './WMLayer';
2
+ import type WMLayer from './WMLayer';
3
3
  export declare const getBBOXandProjString: (map: WMJSMap, layer: WMLayer) => string;
4
4
  export declare const buildWMSGetMapRequest: (map: WMJSMap, layer: WMLayer) => {
5
5
  url: string;
@@ -8,12 +8,12 @@ export interface Capability {
8
8
  Layer: WMSLayerFromGetCapabilities;
9
9
  Request: any;
10
10
  }
11
- export declare const loadGetCapabilitiesViaProxy: (url: string, succes: (param: string) => void, fail: (param: string) => void, xml2jsonrequestURL: string) => void;
11
+ export declare const loadGetCapabilitiesViaProxy: (url: string, succes: (jsonData: GetCapabilitiesJson) => void, fail: (param: string) => void, xml2jsonrequestURL: string) => void;
12
12
  export declare const getWMSUrl: (service?: string, additionalParams?: {}) => string;
13
13
  /**
14
14
  * Global getcapabilities function
15
15
  */
16
- export declare const WMJSGetCapabilities: (service: string, succes: (param: unknown) => void, fail: (param: string) => void, options: {
16
+ export declare const WMJSGetCapabilities: (service: string, succes: (jsonData: GetCapabilitiesJson) => void, fail: (param: string) => void, options: {
17
17
  headers?: {
18
18
  name: string;
19
19
  value: string;
@@ -53,7 +53,7 @@ export declare class WMJSService {
53
53
  * @param succescallback Function called upon succes, cannot be left blank
54
54
  * @param failcallback Function called upon failure, cannot be left blank
55
55
  */
56
- getCapabilities(succescallback: (param: GetCapabilitiesJson) => void, failcallback: (param: unknown) => void, forceReload: boolean, options: any): void;
56
+ getCapabilities(succescallback: (jsonData: GetCapabilitiesJson) => void, failcallback: (jsonData: string) => void, forceReload: boolean, options: any): void;
57
57
  checkException(jsonData: GetCapabilitiesJson): string | undefined;
58
58
  /**
59
59
  * Calls succes with a hierarchical node structure
@@ -6,7 +6,7 @@ export declare enum DebugType {
6
6
  Warning = 1,
7
7
  Error = 2
8
8
  }
9
- export declare const debug: (type: DebugType, message: string, ...optionalParam: unknown[]) => void;
9
+ export declare const debugLogger: (type: DebugType, message: string, ...optionalParam: unknown[]) => void;
10
10
  /**
11
11
  * Checks if variable is defined or not
12
12
  * @param variable The variable to check
@@ -36,7 +36,7 @@ export interface LayerOptions extends LayerFoundation {
36
36
  sldURL?: string;
37
37
  keepOnTop?: boolean;
38
38
  transparent?: boolean;
39
- onReady?: (param: this) => void;
39
+ onReady?: (param: LayerOptions) => void;
40
40
  parentMap?: WMJSMap;
41
41
  headers?: Headers[];
42
42
  failure?: (layer: WMLayer, message: string) => void;
@@ -106,7 +106,7 @@ export default class WMLayer {
106
106
  getgraphinfoURL: string;
107
107
  format: string;
108
108
  _options: LayerOptions;
109
- onReady: (param: this) => void;
109
+ onReady: (param: LayerOptions) => void;
110
110
  optimalFormat: string;
111
111
  wmsextensions: {
112
112
  url: string;
@@ -162,7 +162,7 @@ export default class WMLayer {
162
162
  */
163
163
  getStyleObject(styleName: string, nextPrev: number): Style;
164
164
  getStyle(): string;
165
- getDimension(name: string): WMJSDimension;
165
+ getDimension(name: string): WMJSDimension | undefined;
166
166
  /**
167
167
  * Returns the Coordinate Reference Systems for this layer
168
168
  * @returns List of WMProjection objects
@@ -0,0 +1,9 @@
1
+ import type WMJSMap from './WMJSMap';
2
+ export declare function prefetchImagesForAnimation(wmMap: WMJSMap, maxImagesToPrefetch?: number): void;
3
+ type PrefetchRequest = {
4
+ url: string;
5
+ headers: Headers[];
6
+ };
7
+ export declare function getLayersImageUrlsForTime(wmMap: WMJSMap, timeToPrefetch: string, currentTime: string): PrefetchRequest[];
8
+ export declare function prefetchImagesForNonAnimation(wmMap: WMJSMap, maxImagesToPrefetch?: number): void;
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import WMJSMap, { clearImageCache } from './WMJSMap';
2
- import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debug, DebugType } from './WMJSTools';
2
+ import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType } from './WMJSTools';
3
3
  import WMTimer from './WMTimer';
4
4
  import WMGetServiceFromStore from './WMGetServiceFromStore';
5
5
  import { WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle } from './WMConstants';
@@ -14,6 +14,6 @@ export { default as WMLayer, LayerType } from './WMLayer';
14
14
  export type { LayerOptions, LayerFoundation } from './WMLayer';
15
15
  export { default as WMBBOX } from './WMBBOX';
16
16
  export type { Bbox } from './WMBBOX';
17
- export { WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMTimer, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, parseISO8601DateToDate, I18n, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debug, DebugType, WMImageEventType, WMJSService, getMapImageStore, WMJSDimension, clearImageCache, };
17
+ export { WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMTimer, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, parseISO8601DateToDate, I18n, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, WMJSService, getMapImageStore, WMJSDimension, clearImageCache, };
18
18
  export * from './types';
19
19
  export * from './WMTimeTypes';
@@ -1,22 +1,6 @@
1
- import { CoordinateReferenceSystem, Dimension, LayerFoundation, LayerOptions, LayerType, Style, WMLayer } from '../components';
2
- export declare const defaultReduxLayerRadarColor: {
3
- service: string;
4
- name: string;
5
- title: string;
6
- format: string;
7
- style: string;
8
- enabled: boolean;
9
- layerType: LayerType;
10
- dimensions: never[];
11
- styles: {
12
- title: string;
13
- name: string;
14
- legendURL: string;
15
- abstract: string;
16
- }[];
17
- id: string;
18
- };
19
- export declare const multiDimensionLayer: LayerFoundation;
1
+ import { CoordinateReferenceSystem, Dimension, LayerFoundation, LayerOptions, Style, WMLayer } from '../components';
2
+ export declare const defaultReduxLayerRadarColor: LayerOptions;
3
+ export declare const multiDimensionLayer: LayerOptions;
20
4
  export declare const WmdefaultReduxLayerRadarKNMI: WMLayer;
21
5
  export declare const defaultReduxLayerRadarKNMI: LayerFoundation & {
22
6
  styles: Style[];
@@ -1,19 +1,5 @@
1
- import { LayerType } from '../components/WMLayer';
2
- export declare const defaultReduxLayerRadarKNMI: {
3
- service: string;
4
- name: string;
5
- title: string;
6
- format: string;
7
- style: string;
8
- enabled: boolean;
9
- layerType: LayerType;
10
- dimensions: {
11
- name: string;
12
- units: string;
13
- currentValue: string;
14
- }[];
15
- id: string;
16
- };
1
+ import { LayerOptions, LayerType } from '../components/WMLayer';
2
+ export declare const defaultReduxLayerRadarKNMI: LayerOptions;
17
3
  export declare const multiDimensionLayer: {
18
4
  service: string;
19
5
  id: string;