@opengeoweb/webmap 9.8.0 → 9.10.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 +669 -319
- package/package.json +2 -3
- package/src/lib/components/WMBBOX.d.ts +2 -2
- package/src/lib/components/WMCanvasBuffer.d.ts +2 -2
- package/src/lib/components/WMImageStore.d.ts +2 -2
- package/src/lib/components/WMJSDimension.d.ts +1 -0
- package/src/lib/components/WMListener.d.ts +1 -3
- package/src/lib/components/WMPrefetch.d.ts +2 -2
- package/src/lib/components/WMTime.d.ts +1 -0
- package/src/lib/components/WMTimeTypes.d.ts +2 -2
- package/src/lib/components/index.d.ts +2 -1
- package/src/lib/components/types.d.ts +12 -12
- package/src/lib/utils/index.d.ts +1 -0
- package/src/lib/utils/tilesettings.d.ts +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.0",
|
|
4
4
|
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"throttle-debounce": "^5.0.0",
|
|
13
13
|
"moment": "^2.29.4",
|
|
14
14
|
"proj4": "^2.9.2",
|
|
15
|
-
"lodash": "^4.17.21"
|
|
16
|
-
"date-fns": "^3.3.0"
|
|
15
|
+
"lodash": "^4.17.21"
|
|
17
16
|
},
|
|
18
17
|
"peerDependencies": {},
|
|
19
18
|
"module": "./index.esm.js",
|
|
@@ -4,12 +4,12 @@ import WMImageStore from './WMImageStore';
|
|
|
4
4
|
import WMBBOX from './WMBBOX';
|
|
5
5
|
import WMListener from './WMListener';
|
|
6
6
|
import { LinkedInfo, LinkedInfoContent, WMPosition } from './types';
|
|
7
|
-
|
|
7
|
+
interface InternalCallback {
|
|
8
8
|
beforecanvasstartdraw?: (context: CanvasRenderingContext2D) => void;
|
|
9
9
|
beforecanvasdisplay?: (context: CanvasRenderingContext2D) => void;
|
|
10
10
|
canvasonerror?: (e: LinkedInfo[]) => void;
|
|
11
11
|
aftercanvasdisplay?: (c: CanvasRenderingContext2D) => void;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
interface CanvasBBOX {
|
|
14
14
|
left: number;
|
|
15
15
|
right: number;
|
|
@@ -7,10 +7,10 @@ export default class WMImageStore {
|
|
|
7
7
|
imagesbysrc: Map<string, WMImage>;
|
|
8
8
|
imageLife: number;
|
|
9
9
|
_imageLifeCounter: number;
|
|
10
|
-
_loadEventCallbackList:
|
|
10
|
+
_loadEventCallbackList: {
|
|
11
11
|
id: string;
|
|
12
12
|
callback: (image: WMImage, id: string, imageEventType: WMImageEventType) => void;
|
|
13
|
-
}
|
|
13
|
+
}[];
|
|
14
14
|
_maxNumberOfImages: number;
|
|
15
15
|
_options: {
|
|
16
16
|
id: string;
|
|
@@ -42,6 +42,7 @@ export default class WMJSDimension implements Dimension {
|
|
|
42
42
|
private dimMinValue;
|
|
43
43
|
private dimMaxValue;
|
|
44
44
|
private dimTimeInterval;
|
|
45
|
+
private calculatedTimeInterval;
|
|
45
46
|
constructor(config?: WMJSDimensionConfig);
|
|
46
47
|
generateAllValues(): number | string[];
|
|
47
48
|
setTimeValuesForReferenceTime(referenceTimeValueToSet: string, referenceTimeDim: WMJSDimension): void;
|
|
@@ -4,9 +4,7 @@ export interface CallBack {
|
|
|
4
4
|
keepOnCall: boolean;
|
|
5
5
|
functionpointer: (param?: unknown, that?: unknown) => void;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
[key: string]: boolean;
|
|
9
|
-
}
|
|
7
|
+
export type SuspendedEvent = Record<string, boolean>;
|
|
10
8
|
export default class WMListener {
|
|
11
9
|
private _callBacks;
|
|
12
10
|
private _suspendedEvents;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type WMJSMap from './WMJSMap';
|
|
2
2
|
export declare function prefetchImagesForAnimation(wmMap: WMJSMap, maxImagesToPrefetch?: number): void;
|
|
3
|
-
|
|
3
|
+
interface PrefetchRequest {
|
|
4
4
|
url: string;
|
|
5
5
|
headers: Headers[];
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
export declare function getLayersImageUrlsForTime(wmMap: WMJSMap, timeToPrefetch: string): PrefetchRequest[];
|
|
8
8
|
export declare function prefetchImagesForNonAnimation(wmMap: WMJSMap, maxImagesToPrefetch?: number): void;
|
|
9
9
|
export {};
|
|
@@ -40,3 +40,4 @@ export declare class ParseISOTimeRangeDuration {
|
|
|
40
40
|
getTimeStepFromDateWithinRange(currentDate: CustomDate): number;
|
|
41
41
|
getTimeStepFromDateClipped(currentDate: CustomDate): number;
|
|
42
42
|
}
|
|
43
|
+
export declare function calculateTimeIntervalFromList(dateStrings: string[]): DateInterval;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface DateInterval {
|
|
2
2
|
year: number;
|
|
3
3
|
month: number;
|
|
4
4
|
day: number;
|
|
@@ -7,7 +7,7 @@ type DateInterval = {
|
|
|
7
7
|
second: number;
|
|
8
8
|
isRegularInterval: boolean;
|
|
9
9
|
getTime: () => number;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
export interface CustomDate extends Date {
|
|
12
12
|
add: (dateInterval: DateInterval) => void;
|
|
13
13
|
substract: (dateInterval: DateInterval) => void;
|
|
@@ -7,12 +7,13 @@ import WMImage from './WMImage';
|
|
|
7
7
|
import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
|
|
8
8
|
import { getMapImageStore, WMImageEventType } from './WMImageStore';
|
|
9
9
|
import { WMJSService } from './WMJSService';
|
|
10
|
+
import { getAlternativeImage } from './WMCanvasBuffer';
|
|
10
11
|
export { default as WMJSDimension, handleMomentISOString, } from './WMJSDimension';
|
|
11
12
|
export { default as WMLayer, LayerType } from './WMLayer';
|
|
12
13
|
export type { LayerOptions, LayerFoundation } from './WMLayer';
|
|
13
14
|
export { default as WMBBOX } from './WMBBOX';
|
|
14
15
|
export type { Bbox } from './WMBBOX';
|
|
15
|
-
export { WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, I18n, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, WMJSService, getMapImageStore, clearImageCache, getUriWithParam, };
|
|
16
|
+
export { WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, I18n, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, WMJSService, getMapImageStore, clearImageCache, getUriWithParam, getAlternativeImage, };
|
|
16
17
|
export * from './types';
|
|
17
18
|
export * from './WMTimeTypes';
|
|
18
19
|
export * from './WMConstants';
|
|
@@ -12,18 +12,18 @@ export interface AnimationStep {
|
|
|
12
12
|
}[];
|
|
13
13
|
imagesInPrefetch?: WMImage[];
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export interface WMPosition {
|
|
16
16
|
x: number;
|
|
17
17
|
y: number;
|
|
18
|
-
}
|
|
19
|
-
export
|
|
18
|
+
}
|
|
19
|
+
export interface LinkedInfoContent {
|
|
20
20
|
layer: WMLayer;
|
|
21
21
|
message?: string;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
22
|
+
}
|
|
23
|
+
export interface LinkedInfo {
|
|
24
24
|
linkedInfo: LinkedInfoContent;
|
|
25
|
-
}
|
|
26
|
-
export
|
|
25
|
+
}
|
|
26
|
+
export interface TimeInterval {
|
|
27
27
|
year: number;
|
|
28
28
|
month: number;
|
|
29
29
|
day: number;
|
|
@@ -31,8 +31,8 @@ export type TimeInterval = {
|
|
|
31
31
|
minute: number;
|
|
32
32
|
second: number;
|
|
33
33
|
isRegularInterval: boolean;
|
|
34
|
-
}
|
|
35
|
-
export
|
|
34
|
+
}
|
|
35
|
+
export interface Dimension {
|
|
36
36
|
name?: string;
|
|
37
37
|
units?: string;
|
|
38
38
|
currentValue: string;
|
|
@@ -43,7 +43,7 @@ export type Dimension = {
|
|
|
43
43
|
values?: string;
|
|
44
44
|
unitSymbol?: string;
|
|
45
45
|
validSyncSelection?: boolean;
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
export interface Style {
|
|
48
48
|
title: string;
|
|
49
49
|
name: string;
|
|
@@ -56,13 +56,13 @@ export interface GeographicBoundingBox {
|
|
|
56
56
|
north: string;
|
|
57
57
|
south: string;
|
|
58
58
|
}
|
|
59
|
-
export
|
|
59
|
+
export interface WMLayerType {
|
|
60
60
|
setDimension: (name: string, value: string, updateMapDimensions: boolean) => void;
|
|
61
61
|
getDimension: (name: string) => WMJSDimension;
|
|
62
62
|
dimensions?: WMJSDimension[];
|
|
63
63
|
title?: string;
|
|
64
64
|
headers?: Headers[];
|
|
65
|
-
}
|
|
65
|
+
}
|
|
66
66
|
export interface CoordinateReferenceSystem {
|
|
67
67
|
name?: string;
|
|
68
68
|
bbox?: Bbox;
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -31,8 +31,6 @@ export interface Title {
|
|
|
31
31
|
}
|
|
32
32
|
export interface MapType extends Title, EPSGSettings {
|
|
33
33
|
}
|
|
34
|
-
export
|
|
35
|
-
[mapType: string]: MapType;
|
|
36
|
-
}
|
|
34
|
+
export type TileServers = Record<string, MapType>;
|
|
37
35
|
export declare const tilesettings: TileServers;
|
|
38
36
|
export {};
|