@opengeoweb/webmap 12.5.0 → 12.7.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 +317 -4592
- package/package.json +2 -2
- package/src/lib/components/WMConstants.d.ts +1 -0
- package/src/lib/components/WMImageStore.d.ts +1 -0
- package/src/lib/components/WMLayer.d.ts +2 -7
- package/src/lib/components/WMLayerTypes.d.ts +2 -4
- package/src/lib/components/index.d.ts +1 -5
- package/src/lib/components/types.d.ts +0 -18
- package/src/lib/utils/utils.d.ts +1 -22
- package/src/lib/components/IWMJSMap.d.ts +0 -317
- package/src/lib/components/WMAnimate.d.ts +0 -14
- package/src/lib/components/WMAnimate.spec.d.ts +0 -1
- package/src/lib/components/WMCanvasBuffer.d.ts +0 -123
- package/src/lib/components/WMCanvasBuffer.spec.d.ts +0 -1
- package/src/lib/components/WMCanvasDrawFunctions.d.ts +0 -11
- package/src/lib/components/WMDrawMarker.d.ts +0 -2
- package/src/lib/components/WMDrawMarker.spec.d.ts +0 -1
- package/src/lib/components/WMFlyToBBox.d.ts +0 -24
- package/src/lib/components/WMFlyToBBox.spec.d.ts +0 -1
- package/src/lib/components/WMJSMap.d.ts +0 -224
- package/src/lib/components/WMJSMap.spec.d.ts +0 -1
- package/src/lib/components/WMJSMapHelpers.d.ts +0 -59
- package/src/lib/components/WMJSMapHelpers.spec.d.ts +0 -1
- package/src/lib/components/WMMapPin.d.ts +0 -31
- package/src/lib/components/WMPrefetch.d.ts +0 -9
- package/src/lib/components/WMPrefetch.spec.d.ts +0 -1
- package/src/lib/components/WMTileRenderer.d.ts +0 -7
- package/src/lib/components/WMTileRenderer.spec.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.0",
|
|
4
4
|
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "12.
|
|
11
|
+
"@opengeoweb/shared": "12.7.0",
|
|
12
12
|
"@tanstack/query-core": "^5.69.2",
|
|
13
13
|
"proj4": "^2.9.2",
|
|
14
14
|
"lodash": "^4.17.21",
|
|
@@ -19,3 +19,4 @@ export declare const legendImageStoreLength = 500;
|
|
|
19
19
|
export declare const EVENT_GETCAPABILITIES_START = "onstartgetcapabilities";
|
|
20
20
|
export declare const EVENT_GETCAPABILITIES_READY = "onreadygetcapabilities";
|
|
21
21
|
export declare const WMJSMAP_LONLAT_EPSGCODE: "EPSG:4326";
|
|
22
|
+
export declare const isProjectionSupported: (srs: string, proj4Defintions?: string[][]) => boolean;
|
|
@@ -47,6 +47,7 @@ export default class WMImageStore {
|
|
|
47
47
|
*/
|
|
48
48
|
getAltGeoReferencedImage(srcToLoad: string, _extent: number[], _resolution: number): WMImage | false;
|
|
49
49
|
getGeoReferencedImage(src: string, geoReference: WMGeoReference): WMImage;
|
|
50
|
+
getNumCached(): number;
|
|
50
51
|
/**
|
|
51
52
|
* Get an WMImage object for given URL
|
|
52
53
|
* @param {*} src The url for the image
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type IWMJSMap from './IWMJSMap';
|
|
3
2
|
import WMJSDimension from './WMJSDimension';
|
|
4
3
|
import WMProjection from './WMProjection';
|
|
5
4
|
import { Style, GeographicBoundingBox, GetCapabilitiesJson } from './types';
|
|
@@ -39,7 +38,6 @@ export default class WMLayer {
|
|
|
39
38
|
queryable: boolean;
|
|
40
39
|
styles: Style[];
|
|
41
40
|
serviceTitle: string;
|
|
42
|
-
parentMap: IWMJSMap;
|
|
43
41
|
sldURL: string;
|
|
44
42
|
active: boolean;
|
|
45
43
|
getgraphinfoURL: string;
|
|
@@ -63,12 +61,9 @@ export default class WMLayer {
|
|
|
63
61
|
setAutoUpdate(val: boolean, interval?: number): void;
|
|
64
62
|
setOpacity(opacityValue: number): void;
|
|
65
63
|
getOpacity(): number;
|
|
66
|
-
|
|
67
|
-
zoomToLayer(): void;
|
|
68
|
-
draw(e: string): void;
|
|
69
|
-
handleReferenceTime(name: string, value: string, updateMapDimensions?: boolean): void;
|
|
64
|
+
handleReferenceTime(name: string, value: string): void;
|
|
70
65
|
getDimensions(): WMJSDimension[];
|
|
71
|
-
setDimension(name: string, value: string
|
|
66
|
+
setDimension(name: string, value: string): void;
|
|
72
67
|
_setWMSGetCapabilities(getCapabilitiesJson: GetCapabilitiesJson): void;
|
|
73
68
|
/** A Promise to parse the layer, it will fetch the WMS GetCapabilities document, configure the layer and resolve to a WMLayer object
|
|
74
69
|
* @param forceReload Do not use the cache of the WMS GetCapabilities document, but instead fetch new data from the server
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FeatureCollection } from 'geojson';
|
|
2
2
|
import type { TileServerSettings } from '../utils';
|
|
3
|
-
import type IWMJSMap from './IWMJSMap';
|
|
4
3
|
import type { Dimension } from './types';
|
|
5
4
|
import type WMLayer from './WMLayer';
|
|
6
5
|
export declare enum LayerType {
|
|
@@ -39,12 +38,11 @@ export interface LayerOptions extends LayerFoundation {
|
|
|
39
38
|
keepOnTop?: boolean;
|
|
40
39
|
transparent?: boolean;
|
|
41
40
|
onReady?: (param: LayerOptions) => void;
|
|
42
|
-
parentMap?: IWMJSMap;
|
|
43
41
|
headers?: Headers[];
|
|
44
42
|
failure?: (layer: WMLayer, message: string) => void;
|
|
45
43
|
ReactWMJSLayerId?: string;
|
|
46
|
-
onLayerError?: (layer: WMLayer, error: Error
|
|
47
|
-
onLayerReady?: (layer: WMLayer
|
|
44
|
+
onLayerError?: (layer: WMLayer, error: Error) => void;
|
|
45
|
+
onLayerReady?: (layer: WMLayer) => void;
|
|
48
46
|
geojson?: GeoJSON.FeatureCollection;
|
|
49
47
|
}
|
|
50
48
|
export interface WMSLayerDimInfo {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type IWMJSMap from './IWMJSMap';
|
|
2
1
|
import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType, getUriWithParam, getMapDimURL } from './WMJSTools';
|
|
3
2
|
import { parseISO8601DateToDate, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration } from './WMTime';
|
|
4
3
|
import WMImage from './WMImage';
|
|
5
4
|
import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
|
|
6
5
|
import { WMImageEventType } from './WMImageStore';
|
|
7
6
|
import WMListener from './WMListener';
|
|
8
|
-
import WMJSMap from './WMJSMap';
|
|
9
7
|
import WMProjection from './WMProjection';
|
|
10
8
|
import { LayerType } from './WMLayerTypes';
|
|
11
9
|
import { WMXMLStringToJson } from './WMXMLParser';
|
|
@@ -17,11 +15,9 @@ export { default as WMBBOX } from './WMBBOX';
|
|
|
17
15
|
export type { Bbox } from './WMBBOX';
|
|
18
16
|
export type { WMProjectionWH } from './WMProjection';
|
|
19
17
|
export { WMProjection };
|
|
20
|
-
export {
|
|
18
|
+
export { DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, getUriWithParam, getMapDimURL, WMListener, WMXMLStringToJson, };
|
|
21
19
|
export * from './types';
|
|
22
20
|
export * from './WMTimeTypes';
|
|
23
21
|
export * from './WMConstants';
|
|
24
|
-
export * from './WMJSMapHelpers';
|
|
25
|
-
export * from './WMCanvasDrawFunctions';
|
|
26
22
|
declare const wmServiceListener: WMListener;
|
|
27
23
|
export { wmServiceListener };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import proj4 from 'proj4';
|
|
2
1
|
import type WMJSDimension from './WMJSDimension';
|
|
3
2
|
import type WMLayer from './WMLayer';
|
|
4
3
|
import { Bbox } from './WMBBOX';
|
|
5
4
|
import type WMImage from './WMImage';
|
|
6
|
-
import type IWMJSMap from './IWMJSMap';
|
|
7
5
|
export interface AnimationStep {
|
|
8
6
|
name: string;
|
|
9
7
|
value: string;
|
|
@@ -156,22 +154,6 @@ export interface WMSLayerFromGetCapabilities {
|
|
|
156
154
|
value: string;
|
|
157
155
|
}[];
|
|
158
156
|
}
|
|
159
|
-
export interface WMJSMapMouseClickEvent {
|
|
160
|
-
map: IWMJSMap;
|
|
161
|
-
x: number;
|
|
162
|
-
y: number;
|
|
163
|
-
shiftKeyPressed: boolean;
|
|
164
|
-
}
|
|
165
|
-
export interface IWMJSMapMouseCoordinates {
|
|
166
|
-
mouseX: number;
|
|
167
|
-
mouseDownX: number;
|
|
168
|
-
mouseY: number;
|
|
169
|
-
mouseDownY: number;
|
|
170
|
-
}
|
|
171
|
-
export interface IWMProj4 {
|
|
172
|
-
crs: string;
|
|
173
|
-
proj4: typeof proj4;
|
|
174
|
-
}
|
|
175
157
|
export interface GetCapabilitiesJson {
|
|
176
158
|
WMS_Capabilities?: any;
|
|
177
159
|
WMT_MS_Capabilities?: any;
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WMJSDimension,
|
|
1
|
+
import type { WMJSDimension, WMLayer } from '../components';
|
|
2
2
|
export declare const generateLayerId: () => string;
|
|
3
3
|
export declare const generateMapId: () => string;
|
|
4
4
|
export declare const generateTimesliderId: () => string;
|
|
@@ -15,23 +15,6 @@ export declare const registerWMLayer: (wmLayer: WMLayer, layerId: string) => voi
|
|
|
15
15
|
export declare const getWMLayerById: (layerId: string) => WMLayer;
|
|
16
16
|
export declare const unRegisterWMJSLayer: (layerId: string) => void;
|
|
17
17
|
export declare const unRegisterAllWMJSLayersAndMaps: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Registers a IWMJSMap in a lookuptable with a wmjsMapId
|
|
20
|
-
* @param {IWMJSMap} wmjsMap
|
|
21
|
-
* @param {string} wmjsMapId
|
|
22
|
-
*/
|
|
23
|
-
export declare const registerWMJSMap: (wmjsMap: IWMJSMap, wmjsMapId: string) => void;
|
|
24
|
-
export declare const unRegisterWMJSMap: (wmjsMapId: string) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Get the wmjsMap from the lookuptable with wmjsMapId
|
|
27
|
-
* @param {string} wmjsMapId
|
|
28
|
-
*/
|
|
29
|
-
export declare const getWMJSMapById: (wmjsMapId: string) => IWMJSMap | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Get all wmjsMap id's from the lookuptable with wmjsMapId
|
|
32
|
-
* @param {string} wmjsMapId
|
|
33
|
-
*/
|
|
34
|
-
export declare const getWMJSMapIds: () => string[];
|
|
35
18
|
/**
|
|
36
19
|
* Returns the WMJSDimension object for given layerId and dimension name
|
|
37
20
|
* @param layerId The layerId
|
|
@@ -44,9 +27,5 @@ export declare const getWMJSDimensionForLayerAndDimension: (layerId: string, dim
|
|
|
44
27
|
* @return: The WMJSDimension if found, otherwise null
|
|
45
28
|
*/
|
|
46
29
|
export declare const getWMJSTimeDimensionForLayerId: (layerId: string) => WMJSDimension;
|
|
47
|
-
/**
|
|
48
|
-
* Clears the image store for all maps
|
|
49
|
-
*/
|
|
50
|
-
export declare const clearImageCacheForAllMaps: () => void;
|
|
51
30
|
export declare const roundWithTimeStep: (unixTime: number, timeStep: number, type?: string) => number;
|
|
52
31
|
export declare const getCorrectWMSDimName: (origDimName: string) => string;
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
import WMImageStore from './WMImageStore';
|
|
2
|
-
import { Bbox } from './WMBBOX';
|
|
3
|
-
import WMListener from './WMListener';
|
|
4
|
-
import { CanvasBBOX, CanvasGeoLayer } from './WMCanvasBuffer';
|
|
5
|
-
import WMJSDimension from './WMJSDimension';
|
|
6
|
-
import MapPin from './WMMapPin';
|
|
7
|
-
import WMLayer from './WMLayer';
|
|
8
|
-
import { AnimationStep, IWMJSMapMouseCoordinates, IWMProj4 } from './types';
|
|
9
|
-
import { WMMemo } from './WMMemo';
|
|
10
|
-
import type { TileServerSettings, TileServerDefinition } from '../utils';
|
|
11
|
-
import { WMProjectionWH } from './WMProjection';
|
|
12
|
-
/**
|
|
13
|
-
* *
|
|
14
|
-
* IWMJSMap interface
|
|
15
|
-
*/
|
|
16
|
-
interface IWMJSMap {
|
|
17
|
-
prefetchLayerImagesForTimeMemo: WMMemo;
|
|
18
|
-
shouldPrefetch: boolean;
|
|
19
|
-
mapPin: MapPin;
|
|
20
|
-
mapdimensions: WMJSDimension[];
|
|
21
|
-
timestepInMinutes: number | undefined;
|
|
22
|
-
showLayerInfo: boolean;
|
|
23
|
-
stopAnimating: () => void;
|
|
24
|
-
isAnimating: boolean;
|
|
25
|
-
animationDelay: number;
|
|
26
|
-
animationList: AnimationStep[] | string | undefined;
|
|
27
|
-
currentAnimationStep: number;
|
|
28
|
-
initialAnimationStep: number;
|
|
29
|
-
setAnimationDelay: (delay: number) => void;
|
|
30
|
-
isDestroyed: boolean;
|
|
31
|
-
getMapImageStore: WMImageStore;
|
|
32
|
-
holdShiftToScroll: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* getMapMouseCoordinates returns the coordinates of the mouse in pixels for the map
|
|
35
|
-
* @returns The coordinates of the mouse in pixels for the map
|
|
36
|
-
*/
|
|
37
|
-
getMapMouseCoordinates: () => IWMJSMapMouseCoordinates;
|
|
38
|
-
/**
|
|
39
|
-
* Trigger a mouseUp for the map
|
|
40
|
-
* @param mouseCoordX
|
|
41
|
-
* @param mouseCoordY
|
|
42
|
-
* @param e
|
|
43
|
-
*/
|
|
44
|
-
mouseUp(mouseCoordX: number, mouseCoordY: number, e?: MouseEvent): void;
|
|
45
|
-
/**
|
|
46
|
-
* Trigger a mouseMove for the map
|
|
47
|
-
* @param mouseCoordX
|
|
48
|
-
* @param mouseCoordY
|
|
49
|
-
* @param e
|
|
50
|
-
*/
|
|
51
|
-
mouseMove(mouseCoordX: number, mouseCoordY: number, e?: MouseEvent): void;
|
|
52
|
-
/**
|
|
53
|
-
* Trigger a mousedown for the map
|
|
54
|
-
* @param mouseCoordX
|
|
55
|
-
* @param mouseCoordY
|
|
56
|
-
* @param e
|
|
57
|
-
*/
|
|
58
|
-
mouseDown(mouseCoordX: number, mouseCoordY: number, e?: MouseEvent): void;
|
|
59
|
-
/**
|
|
60
|
-
* Set a list with tileservers to be used within the map instance
|
|
61
|
-
* @param tileRenderSettings
|
|
62
|
-
*/
|
|
63
|
-
setWMTileRendererTileSettings(tileRenderSettings: TileServerSettings): void;
|
|
64
|
-
/**
|
|
65
|
-
* Add one tileserver to the existing set of tileservers to the map instance
|
|
66
|
-
* @param tileRenderSetting
|
|
67
|
-
*/
|
|
68
|
-
addWMTileRendererTileSetting(tileRenderSetting: TileServerDefinition): void;
|
|
69
|
-
/**
|
|
70
|
-
* Displays a message in the map
|
|
71
|
-
* @param message
|
|
72
|
-
*/
|
|
73
|
-
setMessage(message: string): void;
|
|
74
|
-
/**
|
|
75
|
-
* Displays a message in the map, meant to print a time offset in the map (used with multimapviews)
|
|
76
|
-
* @param message
|
|
77
|
-
*/
|
|
78
|
-
setTimeOffset(message: string): void;
|
|
79
|
-
/**
|
|
80
|
-
* Displays the scalebar in the map
|
|
81
|
-
* @param display
|
|
82
|
-
*/
|
|
83
|
-
displayScaleBarInMap(display: boolean): void;
|
|
84
|
-
/**
|
|
85
|
-
* Do not show mouse cursor coordinates in the map
|
|
86
|
-
*/
|
|
87
|
-
hideMouseCursorProperties(): void;
|
|
88
|
-
/**
|
|
89
|
-
* Get all layers currently in the map (except the baselayer and overlayer)
|
|
90
|
-
* @param reverseOrder True to return them in reversed order
|
|
91
|
-
*/
|
|
92
|
-
getLayers(reverseOrder?: boolean): WMLayer[];
|
|
93
|
-
/**
|
|
94
|
-
* Check if this layer is present in the map
|
|
95
|
-
* @param layer
|
|
96
|
-
*/
|
|
97
|
-
hasLayer(layer: WMLayer): boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Set an existing layer for the map, usually used to change the name of the layer
|
|
100
|
-
* @param layer
|
|
101
|
-
*/
|
|
102
|
-
setLayer(layer: WMLayer): Promise<IWMJSMap>;
|
|
103
|
-
/**
|
|
104
|
-
* Displays or hides a given layer
|
|
105
|
-
* @param layer
|
|
106
|
-
* @param enabled
|
|
107
|
-
*/
|
|
108
|
-
displayLayer(layer: WMLayer, enabled: boolean): void;
|
|
109
|
-
/**
|
|
110
|
-
* Remove all layers (except baselayers and overlayers)
|
|
111
|
-
*/
|
|
112
|
-
removeAllLayers(): void;
|
|
113
|
-
/**
|
|
114
|
-
* Delete this specific layer
|
|
115
|
-
* @param layerToDelete
|
|
116
|
-
*/
|
|
117
|
-
deleteLayer(layerToDelete: WMLayer): void;
|
|
118
|
-
/**
|
|
119
|
-
* @param layer of type WMLayer
|
|
120
|
-
*/
|
|
121
|
-
addLayer(layer: WMLayer): Promise<IWMJSMap>;
|
|
122
|
-
/**
|
|
123
|
-
* Zoom to given layer
|
|
124
|
-
* @param _layer
|
|
125
|
-
*/
|
|
126
|
-
zoomToLayer(_layer: WMLayer): void;
|
|
127
|
-
/**
|
|
128
|
-
* Get the current active layer.
|
|
129
|
-
*/
|
|
130
|
-
getActiveLayer(): WMLayer;
|
|
131
|
-
/**
|
|
132
|
-
* Reorder layers according to an index array with indices on how the layers should be reordered.
|
|
133
|
-
*/
|
|
134
|
-
reorderLayers(order: number[]): boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Set the projection of the current webmap object
|
|
137
|
-
* _srs also accepts a projectionProperty object
|
|
138
|
-
*/
|
|
139
|
-
setProjection(_srs: string, _bbox?: Bbox): void;
|
|
140
|
-
/**
|
|
141
|
-
* Returns the current boundingbox, projection, width and height of the map
|
|
142
|
-
*/
|
|
143
|
-
getProjection(): WMProjectionWH;
|
|
144
|
-
/**
|
|
145
|
-
* Set the default boundingbox, used when pressing the home button in the map.
|
|
146
|
-
* @param bbox
|
|
147
|
-
*/
|
|
148
|
-
setDefaultBBOX(bbox: Bbox): void;
|
|
149
|
-
/**
|
|
150
|
-
* Change the current boundingbox of the map
|
|
151
|
-
* @param bbox
|
|
152
|
-
*/
|
|
153
|
-
setBBOX(bbox: Bbox): boolean;
|
|
154
|
-
/**
|
|
155
|
-
* Returns the current boundingbox of the map, updated with the extent for which WMS layers are loaded
|
|
156
|
-
*/
|
|
157
|
-
getBBOX(): Bbox;
|
|
158
|
-
/**
|
|
159
|
-
* Get the current intermediate boundingbox, it is immediately updated when panning or zooming the map. This one is not the one which is used for WMS requests. It can be used to update drawings in the canvas
|
|
160
|
-
*/
|
|
161
|
-
getDrawBBOX(): Bbox;
|
|
162
|
-
/**
|
|
163
|
-
* Get the width and height in pixels of the map
|
|
164
|
-
*/
|
|
165
|
-
getSize(): {
|
|
166
|
-
width: number;
|
|
167
|
-
height: number;
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Change the size of the map in pixels, e.g. when container is resized.s
|
|
171
|
-
* @param w
|
|
172
|
-
* @param h
|
|
173
|
-
*/
|
|
174
|
-
setSize(w: number, h: number): void;
|
|
175
|
-
/**
|
|
176
|
-
* Zoomout given ratio
|
|
177
|
-
* @param ratio 1.0, means zoomout using full boundingbox width, 0.1 means zoom out 10% of full boundingbox width
|
|
178
|
-
*/
|
|
179
|
-
zoomOut(ratio?: number): void;
|
|
180
|
-
/**
|
|
181
|
-
* Zoomin given ratio
|
|
182
|
-
* @param ratio 1.0, meane zoomin using full boundingbox width, 0.1 means zoom in to 10% of full boundingbox width
|
|
183
|
-
*/
|
|
184
|
-
zoomIn(ratio?: number): void;
|
|
185
|
-
/**
|
|
186
|
-
* Zooms the map to the specified bounding box
|
|
187
|
-
* @param _newbbox
|
|
188
|
-
*/
|
|
189
|
-
zoomTo(_newbbox: Bbox): void;
|
|
190
|
-
/**
|
|
191
|
-
* Displays the legend of the layer inside the map
|
|
192
|
-
* @param _displayLegendInMap
|
|
193
|
-
*/
|
|
194
|
-
displayLegendInMap(_displayLegendInMap: boolean): void;
|
|
195
|
-
/**
|
|
196
|
-
* Tell the map to load layers and draw again
|
|
197
|
-
* @param animationList
|
|
198
|
-
*/
|
|
199
|
-
draw(animationList?: AnimationStep[] | string | undefined): void;
|
|
200
|
-
/**
|
|
201
|
-
* Just refresh the drawing buffer, useful when opacity of a layer is changed.
|
|
202
|
-
*/
|
|
203
|
-
redrawBuffer(): void;
|
|
204
|
-
/**
|
|
205
|
-
* Set the baselayers for the map
|
|
206
|
-
* @param layers
|
|
207
|
-
*/
|
|
208
|
-
setBaseLayers(layers: WMLayer[]): void;
|
|
209
|
-
/**
|
|
210
|
-
* Return a list of baselayers from the map
|
|
211
|
-
*/
|
|
212
|
-
getBaseLayers(): WMLayer[];
|
|
213
|
-
/**
|
|
214
|
-
* Returns how many layers the map currently has (baselayers and overlays not included)
|
|
215
|
-
*/
|
|
216
|
-
getNumLayers(): number;
|
|
217
|
-
/**
|
|
218
|
-
* Returns the HTML base element used for the map
|
|
219
|
-
*/
|
|
220
|
-
getBaseElement(): HTMLElement;
|
|
221
|
-
/**
|
|
222
|
-
* Destroys the map, useful when a component container unmounts.
|
|
223
|
-
*/
|
|
224
|
-
destroy(): void;
|
|
225
|
-
/**
|
|
226
|
-
* Pan the map with a given percentage (used for keyboard controls)
|
|
227
|
-
* @param percentageDiffX
|
|
228
|
-
* @param percentageDiffY
|
|
229
|
-
*/
|
|
230
|
-
mapPanPercentage(percentageDiffX: number, percentageDiffY: number): void;
|
|
231
|
-
/**
|
|
232
|
-
* Changes the cursor icon of the map
|
|
233
|
-
* @param cursor 'move', 'pointer' or '' ( for default)
|
|
234
|
-
*/
|
|
235
|
-
setCursor(cursor?: string): void;
|
|
236
|
-
/**
|
|
237
|
-
* Returns the id of this map
|
|
238
|
-
*/
|
|
239
|
-
getId(): string;
|
|
240
|
-
/**
|
|
241
|
-
* Returns proj4 instance of the map
|
|
242
|
-
*/
|
|
243
|
-
getProj4(): IWMProj4;
|
|
244
|
-
/**
|
|
245
|
-
* Zoom in to specified location
|
|
246
|
-
* @param lat
|
|
247
|
-
* @param lng
|
|
248
|
-
*/
|
|
249
|
-
calculateBoundingBoxAndZoom(lat: number, lng: number): void;
|
|
250
|
-
/**
|
|
251
|
-
* Add something to the event listener
|
|
252
|
-
* @param name
|
|
253
|
-
* @param f
|
|
254
|
-
* @param keep
|
|
255
|
-
*/
|
|
256
|
-
addListener<T>(name: string, f: (param: T) => void | boolean, keep?: boolean): boolean;
|
|
257
|
-
/**
|
|
258
|
-
* Remove something from the event listener
|
|
259
|
-
* @param name
|
|
260
|
-
* @param f
|
|
261
|
-
*/
|
|
262
|
-
removeListener<T>(name: string, f: (param: T) => void): void;
|
|
263
|
-
/**
|
|
264
|
-
* Get a direct handle to the event listener system
|
|
265
|
-
*/
|
|
266
|
-
getListener(): WMListener;
|
|
267
|
-
/**
|
|
268
|
-
* Suspend a specific event
|
|
269
|
-
* @param name
|
|
270
|
-
*/
|
|
271
|
-
suspendEvent(name: string): void;
|
|
272
|
-
/**
|
|
273
|
-
* Resume a specific event
|
|
274
|
-
* @param name
|
|
275
|
-
*/
|
|
276
|
-
resumeEvent(name: string): void;
|
|
277
|
-
/**
|
|
278
|
-
* Returns a list of all used map dimensions
|
|
279
|
-
*/
|
|
280
|
-
getDimensionList(): WMJSDimension[];
|
|
281
|
-
/**
|
|
282
|
-
* Get a specific map dimension
|
|
283
|
-
* @param name
|
|
284
|
-
*/
|
|
285
|
-
getDimension(name: string): WMJSDimension | undefined;
|
|
286
|
-
/**
|
|
287
|
-
* Set a specific map dimension
|
|
288
|
-
* @param name
|
|
289
|
-
* @param value
|
|
290
|
-
* @param triggerEvent
|
|
291
|
-
* @param adjustLayerDims
|
|
292
|
-
*/
|
|
293
|
-
setDimension(name: string, value: string, triggerEvent?: boolean, adjustLayerDims?: boolean): void;
|
|
294
|
-
/**
|
|
295
|
-
* Get a handle to the imagestore
|
|
296
|
-
*/
|
|
297
|
-
getImageStore(): WMImageStore;
|
|
298
|
-
/**
|
|
299
|
-
* Tell the imagestore to forget all its images
|
|
300
|
-
*/
|
|
301
|
-
clearImageCache(): void;
|
|
302
|
-
/**
|
|
303
|
-
* Handle to the map pin
|
|
304
|
-
*/
|
|
305
|
-
getMapPin(): MapPin;
|
|
306
|
-
/**
|
|
307
|
-
* For a given WMS GetMap imageUrl, return an alternative image which is directly available for display.
|
|
308
|
-
* @param imageUrl
|
|
309
|
-
* @param bbox
|
|
310
|
-
* @param filterBad
|
|
311
|
-
*/
|
|
312
|
-
getAlternativeImage(imageUrl: string, bbox: CanvasBBOX, filterBad: boolean): CanvasGeoLayer[];
|
|
313
|
-
configureMapDimensions(layer: WMLayer): void;
|
|
314
|
-
detachWheelEvent(): void;
|
|
315
|
-
attachWheelEvent(): void;
|
|
316
|
-
}
|
|
317
|
-
export default IWMJSMap;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type WMJSMap from './WMJSMap';
|
|
2
|
-
export default class WMJSAnimate {
|
|
3
|
-
#private;
|
|
4
|
-
private _map;
|
|
5
|
-
private _divAnimationInfo;
|
|
6
|
-
private _callBack;
|
|
7
|
-
private isNextTimeCloseToWallClockTime;
|
|
8
|
-
private animationTimer;
|
|
9
|
-
private animateBusy;
|
|
10
|
-
constructor(_map: WMJSMap);
|
|
11
|
-
isCurrentAnimationTimeCloseToWallClockTime(): boolean;
|
|
12
|
-
loopAnimation(): void;
|
|
13
|
-
stopAnimating(): void;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import WMBBOX from './WMBBOX';
|
|
2
|
-
import { LinkedInfo, LinkedInfoContent } from './types';
|
|
3
|
-
import type IWMJSMap from './IWMJSMap';
|
|
4
|
-
export type SharedImageListType = Record<string, CanvasGeoLayer[]>;
|
|
5
|
-
interface CanvasBufferCallbacks {
|
|
6
|
-
beforecanvasstartdraw?: (context: CanvasRenderingContext2D) => void;
|
|
7
|
-
beforecanvasdisplay?: (context: CanvasRenderingContext2D) => void;
|
|
8
|
-
canvasonerror?: (e: LinkedInfo[]) => void;
|
|
9
|
-
aftercanvasdisplay?: (c: CanvasRenderingContext2D) => void;
|
|
10
|
-
}
|
|
11
|
-
export interface CanvasBBOX {
|
|
12
|
-
left: number;
|
|
13
|
-
right: number;
|
|
14
|
-
top: number;
|
|
15
|
-
bottom: number;
|
|
16
|
-
}
|
|
17
|
-
export interface CanvasGeoLayer {
|
|
18
|
-
intersect: number;
|
|
19
|
-
areaFractionClosest: number;
|
|
20
|
-
areaFraction: number;
|
|
21
|
-
bbox: CanvasBBOX;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
opacity: number;
|
|
25
|
-
imageAge: number;
|
|
26
|
-
imageSource: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Function to find image url's which are similar to other images, without taking width, height and bbox into account
|
|
30
|
-
* @param imageSource The source / url of the image to check
|
|
31
|
-
* @returns A signature for this image, which is the same for images with different bbox and or width/height
|
|
32
|
-
*/
|
|
33
|
-
export declare const makeQueryStringWithoutGeoInfo: (imageSource: string) => string;
|
|
34
|
-
/**
|
|
35
|
-
* Sort the imageslist
|
|
36
|
-
* @param imagesList
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
export declare const getSortedListOfImages: (imagesList: CanvasGeoLayer[], bbox: CanvasBBOX) => void;
|
|
40
|
-
export default class WMCanvasBuffer {
|
|
41
|
-
private canvas;
|
|
42
|
-
private _ctx;
|
|
43
|
-
private _imageStore;
|
|
44
|
-
private _ready;
|
|
45
|
-
private _canvasLayers;
|
|
46
|
-
private _currentnewbbox;
|
|
47
|
-
private _width;
|
|
48
|
-
private _height;
|
|
49
|
-
private _webMapJS;
|
|
50
|
-
private _internalCallbacks;
|
|
51
|
-
private _animationFrameRequest;
|
|
52
|
-
private _timerHandle;
|
|
53
|
-
private _errorList;
|
|
54
|
-
private _isBufferLoading;
|
|
55
|
-
private _onLoadReadyFunction;
|
|
56
|
-
private sharedImagesList;
|
|
57
|
-
constructor(webMapJS: IWMJSMap, w: number, h: number, internalCallbacks: CanvasBufferCallbacks);
|
|
58
|
-
/**
|
|
59
|
-
* Triggered by the WMImageStore when an image completes loading
|
|
60
|
-
* @param image
|
|
61
|
-
*/
|
|
62
|
-
private _imageLoadComplete;
|
|
63
|
-
private _drawCanvasGeoLayer;
|
|
64
|
-
private _display;
|
|
65
|
-
private _finishedLoading;
|
|
66
|
-
private _checkIfLoading;
|
|
67
|
-
private _isImageStoreLoading;
|
|
68
|
-
private _getPixelCoordFromGeoCoord;
|
|
69
|
-
/**
|
|
70
|
-
* Made accessible for testing purposes
|
|
71
|
-
* @returns
|
|
72
|
-
*/
|
|
73
|
-
getSharedImagesList(): SharedImageListType;
|
|
74
|
-
/**
|
|
75
|
-
* Function to find the an alternative available image for an image url that is not yet loaded
|
|
76
|
-
* @param imageUrl The image source / url to find an alternative for
|
|
77
|
-
* @param imageStore The imagestore where the other images are located
|
|
78
|
-
* @param bbox The boundingbox to search this image for
|
|
79
|
-
* @param filterUnsuitableAlternatives When true, images which have an overlap or ratio less then given threshold will be discarded as alternative
|
|
80
|
-
* @returns A canvasLayer, containing the new image source with its geo properties
|
|
81
|
-
*/
|
|
82
|
-
getAlternativeImage(imageUrl: string, bbox: CanvasBBOX, filterUnsuitableAlternatives?: boolean): CanvasGeoLayer[];
|
|
83
|
-
/**
|
|
84
|
-
* Removes the image from the alternative imageslist (in case imagestore cache gets cleaned), this used when the imagestore triggers a delete event for an image
|
|
85
|
-
* @param imageUrl The url for the image to remove
|
|
86
|
-
*/
|
|
87
|
-
removeAlternativeImage(imageUrl: string): void;
|
|
88
|
-
/**
|
|
89
|
-
* Add an image to the sharedimages list
|
|
90
|
-
* @param newLayer A canvaslayer object to add.
|
|
91
|
-
*/
|
|
92
|
-
addAlternativeImage(newLayer: CanvasGeoLayer): void;
|
|
93
|
-
/**
|
|
94
|
-
* Used to tell the canvas that the map is resized,
|
|
95
|
-
* @param w
|
|
96
|
-
* @param h
|
|
97
|
-
* @returns
|
|
98
|
-
*/
|
|
99
|
-
resize(w: string, h: string): void;
|
|
100
|
-
/**
|
|
101
|
-
* Reset when a new set of layers have been added
|
|
102
|
-
*/
|
|
103
|
-
initCanvasLayers(): void;
|
|
104
|
-
/**
|
|
105
|
-
* Set's a layer inside the canvasbuffer with given index and imagesource.
|
|
106
|
-
* The image is directly loaded, but if loading is not complete when drawing, an alternative image is search in the alternative images list
|
|
107
|
-
* @param layerIndex The layer index, similar to z-Index, 0 drawn on the bottom, higher numbers on top
|
|
108
|
-
* @param imageSource The url of the image, usually a GetMap url
|
|
109
|
-
* @param linkedInfo A linkedinfo object to track properties for the image and layer, like errors
|
|
110
|
-
* @param opacity Opacity of this layer
|
|
111
|
-
* @param bbox The boundingbox for this layer
|
|
112
|
-
* @returns Void
|
|
113
|
-
*/
|
|
114
|
-
addLayerToCanvas(layerIndex: number, imageSource: string, linkedInfo: LinkedInfoContent, opacity: number, bbox: WMBBOX): void;
|
|
115
|
-
display(): void;
|
|
116
|
-
setBBOX(newbbox: WMBBOX): void;
|
|
117
|
-
/**
|
|
118
|
-
* Used when the map is destroyed
|
|
119
|
-
*/
|
|
120
|
-
destroy(): void;
|
|
121
|
-
getHTMLCanvasElement(): HTMLCanvasElement;
|
|
122
|
-
}
|
|
123
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type IWMJSMap from './IWMJSMap';
|
|
2
|
-
interface ScaleBarProps {
|
|
3
|
-
width: number;
|
|
4
|
-
mapHeight: number;
|
|
5
|
-
mapunits: number;
|
|
6
|
-
mapSrs: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const drawTextBG: (ctx: CanvasRenderingContext2D, txt: string, x: number, y: number, fontSize: number) => void;
|
|
9
|
-
export declare const getScaleBarProperties: (map: IWMJSMap) => ScaleBarProps;
|
|
10
|
-
export declare const drawScaleBar: (scaleBarProps: ScaleBarProps, ctx: CanvasRenderingContext2D) => void;
|
|
11
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|