@opengeoweb/webmap 9.28.1 → 9.29.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.
Files changed (79) hide show
  1. package/index.esm.js +709 -714
  2. package/package.json +1 -1
  3. package/src/index.d.ts +1 -1
  4. package/src/lib/components/IWMJSMap.d.ts +315 -315
  5. package/src/lib/components/WMAnimate.d.ts +14 -14
  6. package/src/lib/components/WMAnimate.spec.d.ts +1 -1
  7. package/src/lib/components/WMBBOX.d.ts +31 -31
  8. package/src/lib/components/WMBBOX.spec.d.ts +1 -1
  9. package/src/lib/components/WMCanvasBuffer.d.ts +123 -123
  10. package/src/lib/components/WMCanvasBuffer.spec.d.ts +1 -1
  11. package/src/lib/components/WMCanvasDrawFunctions.d.ts +11 -11
  12. package/src/lib/components/WMConstants.d.ts +19 -19
  13. package/src/lib/components/WMDrawMarker.d.ts +2 -2
  14. package/src/lib/components/WMDrawMarker.spec.d.ts +1 -1
  15. package/src/lib/components/WMFlyToBBox.d.ts +25 -25
  16. package/src/lib/components/WMFlyToBBox.spec.d.ts +1 -1
  17. package/src/lib/components/WMGetServiceFromStore.d.ts +3 -3
  18. package/src/lib/components/WMGlobals.d.ts +8 -8
  19. package/src/lib/components/WMImage.d.ts +97 -97
  20. package/src/lib/components/WMImage.spec.d.ts +1 -1
  21. package/src/lib/components/WMImageStore.d.ts +44 -44
  22. package/src/lib/components/WMImageStore.spec.d.ts +1 -1
  23. package/src/lib/components/WMJSDimension.d.ts +112 -112
  24. package/src/lib/components/WMJSDimension.spec.d.ts +1 -1
  25. package/src/lib/components/WMJSExternalDependencies.d.ts +2 -2
  26. package/src/lib/components/WMJSMap.d.ts +222 -220
  27. package/src/lib/components/WMJSMap.spec.d.ts +1 -1
  28. package/src/lib/components/WMJSMapHelpers.d.ts +59 -58
  29. package/src/lib/components/WMJSMapHelpers.spec.d.ts +1 -1
  30. package/src/lib/components/WMJSService.d.ts +69 -69
  31. package/src/lib/components/WMJSService.spec.d.ts +1 -1
  32. package/src/lib/components/WMJSTools.d.ts +100 -100
  33. package/src/lib/components/WMJSTools.spec.d.ts +1 -1
  34. package/src/lib/components/WMLayer.d.ts +194 -194
  35. package/src/lib/components/WMLayer.spec.d.ts +1 -1
  36. package/src/lib/components/WMLegend.d.ts +6 -6
  37. package/src/lib/components/WMLegend.spec.d.ts +1 -1
  38. package/src/lib/components/WMListener.d.ts +57 -57
  39. package/src/lib/components/WMListener.spec.d.ts +1 -1
  40. package/src/lib/components/WMMapPin.d.ts +31 -31
  41. package/src/lib/components/WMMemo.d.ts +5 -5
  42. package/src/lib/components/WMMemo.spec.d.ts +1 -1
  43. package/src/lib/components/WMPrefetch.d.ts +9 -9
  44. package/src/lib/components/WMPrefetch.spec.d.ts +1 -1
  45. package/src/lib/components/WMProjection.d.ts +16 -16
  46. package/src/lib/components/WMTileRenderer.d.ts +7 -7
  47. package/src/lib/components/WMTileRenderer.spec.d.ts +1 -1
  48. package/src/lib/components/WMTime.d.ts +43 -43
  49. package/src/lib/components/WMTime.spec.d.ts +1 -1
  50. package/src/lib/components/WMTimeTypes.d.ts +19 -19
  51. package/src/lib/components/WMTimer.d.ts +11 -11
  52. package/src/lib/components/WMTimer.spec.d.ts +1 -1
  53. package/src/lib/components/WMXMLParser.d.ts +9 -9
  54. package/src/lib/components/WMXMLParser.spec.d.ts +1 -1
  55. package/src/lib/components/index.d.ts +24 -24
  56. package/src/lib/components/types.d.ts +174 -174
  57. package/src/lib/index.d.ts +5 -5
  58. package/src/lib/utils/consoleErrorMessages.d.ts +11 -11
  59. package/src/lib/utils/fakeMaxAgeResponses.d.ts +1 -1
  60. package/src/lib/utils/getCapabilities/getCapabilities.d.ts +18 -18
  61. package/src/lib/utils/getCapabilities/getCapabilities.spec.d.ts +1 -1
  62. package/src/lib/utils/getCapabilities/index.d.ts +2 -2
  63. package/src/lib/utils/getCapabilities/mocks/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +1 -1
  64. package/src/lib/utils/getCapabilities/mocks/index.d.ts +89 -89
  65. package/src/lib/utils/getCapabilities/mocks/mockGetCapabilities.d.ts +87 -87
  66. package/src/lib/utils/i18n.d.ts +4 -2
  67. package/src/lib/utils/index.d.ts +9 -9
  68. package/src/lib/utils/mapConstants.d.ts +7 -7
  69. package/src/lib/utils/specs/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +2 -2
  70. package/src/lib/utils/specs/WMS130GetCapabilitiesHarmN25.d.ts +2 -2
  71. package/src/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops.d.ts +2 -2
  72. package/src/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithInheritLayerprops.d.ts +2 -2
  73. package/src/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops.d.ts +2 -2
  74. package/src/lib/utils/specs/WMSSmartMet.d.ts +2 -2
  75. package/src/lib/utils/testSettings.d.ts +14 -14
  76. package/src/lib/utils/testUtils.d.ts +21 -21
  77. package/src/lib/utils/tilesettings.d.ts +26 -26
  78. package/src/lib/utils/utils.d.ts +56 -56
  79. package/src/lib/utils/utils.spec.d.ts +1 -1
@@ -1,194 +1,194 @@
1
- /// <reference types="node" />
2
- import { FeatureCollection } from 'geojson';
3
- import type IWMJSMap from './IWMJSMap';
4
- import WMJSDimension from './WMJSDimension';
5
- import WMProjection from './WMProjection';
6
- import { GetCapabilitiesJson } from './WMJSService';
7
- import { Style, Dimension, LayerProps, GeographicBoundingBox } from './types';
8
- import type { TileServerSettings } from '../utils/tilesettings';
9
- export declare enum LayerType {
10
- mapLayer = "mapLayer",
11
- baseLayer = "baseLayer",
12
- overLayer = "overLayer",
13
- featureLayer = "featureLayer"
14
- }
15
- export interface TiledLayerFoundation {
16
- tileServer?: TileServerSettings;
17
- }
18
- export interface LayerFoundation extends TiledLayerFoundation {
19
- acceptanceTimeInMinutes?: number;
20
- dimensions?: Dimension[];
21
- enabled?: boolean;
22
- format?: string;
23
- id?: string;
24
- layerType?: LayerType;
25
- name?: string;
26
- opacity?: number;
27
- service?: string;
28
- style?: string;
29
- title?: string;
30
- type?: string;
31
- geojson?: FeatureCollection;
32
- }
33
- export interface LayerOptions extends LayerFoundation {
34
- id: string;
35
- layerType: LayerType;
36
- service: string;
37
- active?: boolean;
38
- getgraphinfoURL?: string;
39
- currentStyle?: string;
40
- sldURL?: string;
41
- keepOnTop?: boolean;
42
- transparent?: boolean;
43
- onReady?: (param: LayerOptions) => void;
44
- parentMap?: IWMJSMap;
45
- headers?: Headers[];
46
- failure?: (layer: WMLayer, message: string) => void;
47
- ReactWMJSLayerId?: string;
48
- onLayerError?: (layer: WMLayer, error: Error, webmapInstance: IWMJSMap) => void;
49
- onLayerReady?: (layer: WMLayer, webmap?: IWMJSMap) => void;
50
- geojson?: GeoJSON.FeatureCollection;
51
- }
52
- /**
53
- * Helper function to figure out the dimensions from the WMS layer object (From WMS GetCapabilities). Parses both WMS 1.1.1 and WMS 1.3.0.
54
- * @param layerObjectFromWMS The corresponding layer object from the WMS GetCapabilities.
55
- * @param layer THe WMLayer to configure
56
- * @param layerDimNamesToRemove A set of dimensions names which are flagged for removal, this function removes the dimension from the set if found in the layer.
57
- */
58
- export declare const addDimsForLayer: (layerProps: LayerProps, layer: WMLayer, layerDimNamesToRemove: Set<string>) => void;
59
- /**
60
- * Helper function to configure the WMS Styles from the WMS GetCapabilities document.
61
- * @param nestedLayerPath Array of WMS Layers from `[Root WMS Layer] => [Parent(s) WMS Layer] => [This WMS layer]`.
62
- * @param wmLayer The WMLayer object to configure
63
- */
64
- export declare const configureStyles: (layerProps: LayerProps, wmLayer: WMLayer) => void;
65
- /**
66
- * Helper function to configure the dimensions for this layer from the WMS GetCapabilities document.
67
- * @param nestedLayerPath Array of WMS Layers from `[Root WMS Layer] => [Parent(s) WMS Layer] => [This WMS layer]`.
68
- * @param wmLayer The WMLayer object to configure
69
- */
70
- export declare const configureDimensions: (layerProps: LayerProps, wmLayer: WMLayer) => void;
71
- export declare const configureGeographicBoundingBox: (layerProps: LayerProps, wmLayer: WMLayer) => void;
72
- export default class WMLayer {
73
- id: string;
74
- name?: string;
75
- ReactWMJSLayerId?: string;
76
- hasError?: boolean;
77
- enabled?: boolean;
78
- lastError?: string;
79
- legendGraphic?: string;
80
- title?: string;
81
- opacity?: number;
82
- service: string;
83
- layerType: LayerType;
84
- currentStyle?: string;
85
- linkedInfo: {
86
- layer: string;
87
- message: string;
88
- };
89
- headers: Headers[];
90
- autoupdate: boolean;
91
- timer: NodeJS.Timeout | number;
92
- getmapURL: string;
93
- getfeatureinfoURL: string;
94
- getlegendgraphicURL: string;
95
- keepOnTop: boolean;
96
- transparent: boolean;
97
- legendIsDimensionDependent: boolean;
98
- wms130bboxcompatibilitymode: boolean;
99
- version: string;
100
- path: string;
101
- type: string;
102
- abstract: string;
103
- dimensions: WMJSDimension[];
104
- projectionProperties: WMProjection[];
105
- queryable: boolean;
106
- styles: Style[];
107
- serviceTitle: string;
108
- parentMap: IWMJSMap;
109
- sldURL: string;
110
- active: boolean;
111
- getgraphinfoURL: string;
112
- format: string;
113
- _options: LayerOptions;
114
- onReady: (param: LayerOptions) => void;
115
- optimalFormat: string;
116
- wmsextensions: {
117
- url: string;
118
- colorscalerange: Record<string, unknown>[];
119
- };
120
- isConfigured: boolean;
121
- geographicBoundingBox?: GeographicBoundingBox;
122
- geojson?: GeoJSON.FeatureCollection;
123
- currentRequestedGetMapURL?: string;
124
- init(): void;
125
- constructor(options?: LayerOptions);
126
- getLayerName(): string;
127
- toggleAutoUpdate(): void;
128
- setAutoUpdate(val: boolean, interval?: number, callback?: () => void): void;
129
- setOpacity(opacityValue: number): void;
130
- getOpacity(): number;
131
- remove(): void;
132
- zoomToLayer(): void;
133
- draw(e: string): void;
134
- handleReferenceTime(name: string, value: string, updateMapDimensions?: boolean): void;
135
- getDimensions(): WMJSDimension[];
136
- setDimension(name: string, value: string, updateMapDimensions?: boolean): void;
137
- __parseGetCapForLayer(getcapabilitiesjson: GetCapabilitiesJson, layerDoneCallback: (layer: WMLayer) => void, fail: (layer: WMLayer, message: string) => void): void;
138
- /**
139
- * Calls success with a configured layer object
140
- * Calls options.failure with error message.
141
- * Throws string exceptions when someting goes wrong
142
- */
143
- parseLayer(_layerDoneCallback: (layer: WMLayer) => void, forceReload: boolean, origin: string): void;
144
- /**
145
- * A Promise to parse the layer, it will fetch the WMS GetCapabilities document, configure the layer and resolve to a WMLayer object
146
- * @param forceReload Do not use the cache of the WMS GetCapabilities document, but instead fetch new data from the server
147
- * @returns WMLayer object
148
- */
149
- parseLayerPromise(forceReload?: boolean): Promise<WMLayer>;
150
- cloneLayer(): WMLayer;
151
- /**
152
- * Set or change the name of this layer. This involves re-parsing the WMS GetCapabilities document and updating the affected layer properties. When done, it resolves the WMLayer
153
- * @param name The name of the layer
154
- * @returns Promise resolving to a WMLayer object
155
- */
156
- setName(name: string): Promise<WMLayer>;
157
- /**
158
- * Sets the style by its name
159
- * @param style: The name of the style (not the object)
160
- */
161
- setStyle(styleName: string): void;
162
- getStyles(): Style[];
163
- /**
164
- * Get the styleobject by name
165
- * @param styleName The name of the style
166
- * @param nextPrev, can be -1 or +1 to get the next or previous style object in circular manner.
167
- */
168
- getStyleObject(styleName: string, nextPrev: number): Style;
169
- getStyle(): string;
170
- getDimension(name: string): WMJSDimension | undefined;
171
- /**
172
- * Returns the Coordinate Reference Systems for this layer
173
- * @returns List of WMProjection objects
174
- */
175
- getCRS(): WMProjection[];
176
- /**
177
- * Get Coordinate reference system by name
178
- *
179
- * @param srsName Name of the coordinate reference system to get
180
- * @returns A WMProjection object if found, otherwise undefined.
181
- */
182
- getCRSByName(srsName: string): WMProjection;
183
- /**
184
- * Get Coordinate reference system by name. Note 2021-05-17: It is more inline with other function names to use the getCRSByName function instead.
185
- *
186
- * @param srsName Name of the coordinate reference system to get
187
- * @returns A WMProjection object if found, otherwise undefined.
188
- */
189
- getProjection(srsName: string): WMProjection;
190
- setSLDURL(url: string): void;
191
- display(displayornot: boolean): void;
192
- setCurrentRequestedGetMapURL(url: string): void;
193
- getCurrentRequestedGetMapURL(): string | undefined;
194
- }
1
+ /// <reference types="node" />
2
+ import { FeatureCollection } from 'geojson';
3
+ import type IWMJSMap from './IWMJSMap';
4
+ import WMJSDimension from './WMJSDimension';
5
+ import WMProjection from './WMProjection';
6
+ import { GetCapabilitiesJson } from './WMJSService';
7
+ import { Style, Dimension, LayerProps, GeographicBoundingBox } from './types';
8
+ import type { TileServerSettings } from '../utils/tilesettings';
9
+ export declare enum LayerType {
10
+ mapLayer = "mapLayer",
11
+ baseLayer = "baseLayer",
12
+ overLayer = "overLayer",
13
+ featureLayer = "featureLayer"
14
+ }
15
+ export interface TiledLayerFoundation {
16
+ tileServer?: TileServerSettings;
17
+ }
18
+ export interface LayerFoundation extends TiledLayerFoundation {
19
+ acceptanceTimeInMinutes?: number;
20
+ dimensions?: Dimension[];
21
+ enabled?: boolean;
22
+ format?: string;
23
+ id?: string;
24
+ layerType?: LayerType;
25
+ name?: string;
26
+ opacity?: number;
27
+ service?: string;
28
+ style?: string;
29
+ title?: string;
30
+ type?: string;
31
+ geojson?: FeatureCollection;
32
+ }
33
+ export interface LayerOptions extends LayerFoundation {
34
+ id: string;
35
+ layerType: LayerType;
36
+ service: string;
37
+ active?: boolean;
38
+ getgraphinfoURL?: string;
39
+ currentStyle?: string;
40
+ sldURL?: string;
41
+ keepOnTop?: boolean;
42
+ transparent?: boolean;
43
+ onReady?: (param: LayerOptions) => void;
44
+ parentMap?: IWMJSMap;
45
+ headers?: Headers[];
46
+ failure?: (layer: WMLayer, message: string) => void;
47
+ ReactWMJSLayerId?: string;
48
+ onLayerError?: (layer: WMLayer, error: Error, webmapInstance: IWMJSMap) => void;
49
+ onLayerReady?: (layer: WMLayer, webmap?: IWMJSMap) => void;
50
+ geojson?: GeoJSON.FeatureCollection;
51
+ }
52
+ /**
53
+ * Helper function to figure out the dimensions from the WMS layer object (From WMS GetCapabilities). Parses both WMS 1.1.1 and WMS 1.3.0.
54
+ * @param layerObjectFromWMS The corresponding layer object from the WMS GetCapabilities.
55
+ * @param layer THe WMLayer to configure
56
+ * @param layerDimNamesToRemove A set of dimensions names which are flagged for removal, this function removes the dimension from the set if found in the layer.
57
+ */
58
+ export declare const addDimsForLayer: (layerProps: LayerProps, layer: WMLayer, layerDimNamesToRemove: Set<string>) => void;
59
+ /**
60
+ * Helper function to configure the WMS Styles from the WMS GetCapabilities document.
61
+ * @param nestedLayerPath Array of WMS Layers from `[Root WMS Layer] => [Parent(s) WMS Layer] => [This WMS layer]`.
62
+ * @param wmLayer The WMLayer object to configure
63
+ */
64
+ export declare const configureStyles: (layerProps: LayerProps, wmLayer: WMLayer) => void;
65
+ /**
66
+ * Helper function to configure the dimensions for this layer from the WMS GetCapabilities document.
67
+ * @param nestedLayerPath Array of WMS Layers from `[Root WMS Layer] => [Parent(s) WMS Layer] => [This WMS layer]`.
68
+ * @param wmLayer The WMLayer object to configure
69
+ */
70
+ export declare const configureDimensions: (layerProps: LayerProps, wmLayer: WMLayer) => void;
71
+ export declare const configureGeographicBoundingBox: (layerProps: LayerProps, wmLayer: WMLayer) => void;
72
+ export default class WMLayer {
73
+ id: string;
74
+ name?: string;
75
+ ReactWMJSLayerId?: string;
76
+ hasError?: boolean;
77
+ enabled?: boolean;
78
+ lastError?: string;
79
+ legendGraphic?: string;
80
+ title?: string;
81
+ opacity?: number;
82
+ service: string;
83
+ layerType: LayerType;
84
+ currentStyle?: string;
85
+ linkedInfo: {
86
+ layer: string;
87
+ message: string;
88
+ };
89
+ headers: Headers[];
90
+ autoupdate: boolean;
91
+ timer: NodeJS.Timeout | number;
92
+ getmapURL: string;
93
+ getfeatureinfoURL: string;
94
+ getlegendgraphicURL: string;
95
+ keepOnTop: boolean;
96
+ transparent: boolean;
97
+ legendIsDimensionDependent: boolean;
98
+ wms130bboxcompatibilitymode: boolean;
99
+ version: string;
100
+ path: string;
101
+ type: string;
102
+ abstract: string;
103
+ dimensions: WMJSDimension[];
104
+ projectionProperties: WMProjection[];
105
+ queryable: boolean;
106
+ styles: Style[];
107
+ serviceTitle: string;
108
+ parentMap: IWMJSMap;
109
+ sldURL: string;
110
+ active: boolean;
111
+ getgraphinfoURL: string;
112
+ format: string;
113
+ _options: LayerOptions;
114
+ onReady: (param: LayerOptions) => void;
115
+ optimalFormat: string;
116
+ wmsextensions: {
117
+ url: string;
118
+ colorscalerange: Record<string, unknown>[];
119
+ };
120
+ isConfigured: boolean;
121
+ geographicBoundingBox?: GeographicBoundingBox;
122
+ geojson?: GeoJSON.FeatureCollection;
123
+ currentRequestedGetMapURL?: string;
124
+ init(): void;
125
+ constructor(options?: LayerOptions);
126
+ getLayerName(): string;
127
+ toggleAutoUpdate(): void;
128
+ setAutoUpdate(val: boolean, interval?: number, callback?: () => void): void;
129
+ setOpacity(opacityValue: number): void;
130
+ getOpacity(): number;
131
+ remove(): void;
132
+ zoomToLayer(): void;
133
+ draw(e: string): void;
134
+ handleReferenceTime(name: string, value: string, updateMapDimensions?: boolean): void;
135
+ getDimensions(): WMJSDimension[];
136
+ setDimension(name: string, value: string, updateMapDimensions?: boolean): void;
137
+ __parseGetCapForLayer(getcapabilitiesjson: GetCapabilitiesJson, layerDoneCallback: (layer: WMLayer) => void, fail: (layer: WMLayer, message: string) => void): void;
138
+ /**
139
+ * Calls success with a configured layer object
140
+ * Calls options.failure with error message.
141
+ * Throws string exceptions when someting goes wrong
142
+ */
143
+ parseLayer(_layerDoneCallback: (layer: WMLayer) => void, forceReload: boolean, origin: string): void;
144
+ /**
145
+ * A Promise to parse the layer, it will fetch the WMS GetCapabilities document, configure the layer and resolve to a WMLayer object
146
+ * @param forceReload Do not use the cache of the WMS GetCapabilities document, but instead fetch new data from the server
147
+ * @returns WMLayer object
148
+ */
149
+ parseLayerPromise(forceReload?: boolean): Promise<WMLayer>;
150
+ cloneLayer(): WMLayer;
151
+ /**
152
+ * Set or change the name of this layer. This involves re-parsing the WMS GetCapabilities document and updating the affected layer properties. When done, it resolves the WMLayer
153
+ * @param name The name of the layer
154
+ * @returns Promise resolving to a WMLayer object
155
+ */
156
+ setName(name: string): Promise<WMLayer>;
157
+ /**
158
+ * Sets the style by its name
159
+ * @param style: The name of the style (not the object)
160
+ */
161
+ setStyle(styleName: string): void;
162
+ getStyles(): Style[];
163
+ /**
164
+ * Get the styleobject by name
165
+ * @param styleName The name of the style
166
+ * @param nextPrev, can be -1 or +1 to get the next or previous style object in circular manner.
167
+ */
168
+ getStyleObject(styleName: string, nextPrev: number): Style;
169
+ getStyle(): string;
170
+ getDimension(name: string): WMJSDimension | undefined;
171
+ /**
172
+ * Returns the Coordinate Reference Systems for this layer
173
+ * @returns List of WMProjection objects
174
+ */
175
+ getCRS(): WMProjection[];
176
+ /**
177
+ * Get Coordinate reference system by name
178
+ *
179
+ * @param srsName Name of the coordinate reference system to get
180
+ * @returns A WMProjection object if found, otherwise undefined.
181
+ */
182
+ getCRSByName(srsName: string): WMProjection;
183
+ /**
184
+ * Get Coordinate reference system by name. Note 2021-05-17: It is more inline with other function names to use the getCRSByName function instead.
185
+ *
186
+ * @param srsName Name of the coordinate reference system to get
187
+ * @returns A WMProjection object if found, otherwise undefined.
188
+ */
189
+ getProjection(srsName: string): WMProjection;
190
+ setSLDURL(url: string): void;
191
+ display(displayornot: boolean): void;
192
+ setCurrentRequestedGetMapURL(url: string): void;
193
+ getCurrentRequestedGetMapURL(): string | undefined;
194
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,6 +1,6 @@
1
- import WMImageStore from './WMImageStore';
2
- import WMLayer from './WMLayer';
3
- export declare const legendImageStore: WMImageStore;
4
- export declare const getLegendGraphicURLForLayer: (layer: WMLayer, width?: number, height?: number) => string;
5
- export declare const getLegendImageStore: () => WMImageStore;
6
- export declare const drawLegend: (canvasContext: CanvasRenderingContext2D, width: number, height: number, layers: WMLayer[]) => void;
1
+ import WMImageStore from './WMImageStore';
2
+ import WMLayer from './WMLayer';
3
+ export declare const legendImageStore: WMImageStore;
4
+ export declare const getLegendGraphicURLForLayer: (layer: WMLayer, width?: number, height?: number) => string;
5
+ export declare const getLegendImageStore: () => WMImageStore;
6
+ export declare const drawLegend: (canvasContext: CanvasRenderingContext2D, width: number, height: number, layers: WMLayer[]) => void;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,57 +1,57 @@
1
- export default class WMListener {
2
- private registeredEvents;
3
- private _suspendedEvents;
4
- private _suspendAllEvents;
5
- constructor();
6
- /**
7
- * Remove events by name and function.
8
- * @param name Event name
9
- * @param f Function pointer to check
10
- */
11
- removeEventListener(name: string, f: (param?: unknown) => unknown): number;
12
- /**
13
- * Remove all events by name
14
- * @param name Event name
15
- */
16
- removeEventListeners(name: string): number;
17
- /**
18
- * Add multiple functions which will be called after the event with the same name is triggered
19
- * @param name: The name of the event to register
20
- * @param function: The function to trigger
21
- * @param keepOnCall: When false, this event name and function combination is removed once triggered.
22
- * When true Otherwise keep the event and allow it to be triggered multiple times
23
- * @return: true if the event is registerd, false if it already was registered
24
- */
25
- addEventListener(name: string, functionpointer: (param: unknown) => void, keepOnCall?: boolean): boolean;
26
- /**
27
- * Destroys this listener, deregistering all events
28
- */
29
- destroy(): void;
30
- /**
31
- * Suspend a specific event by name, triggers will not be called
32
- * @param name
33
- */
34
- suspendEvent(name: string): void;
35
- /**
36
- * Resume a specific event by name, resuming normal operation
37
- * @param name
38
- */
39
- resumeEvent(name: string): void;
40
- /**
41
- * This listener will not listen to any triggers
42
- */
43
- suspendEvents(): void;
44
- /**
45
- * Resume event listening
46
- */
47
- resumeEvents(): void;
48
- /**
49
- * Trigger an event with custom parameters
50
- * @param name The name of the event to trigger
51
- * @param param The parameters to provide to the associated function
52
- * @returns The results of the function.
53
- */
54
- triggerEvent(name: string, param?: unknown): unknown[];
55
- private removeFinishedEvents;
56
- removeEvents(name: string, f?: (param?: unknown) => unknown): number;
57
- }
1
+ export default class WMListener {
2
+ private registeredEvents;
3
+ private _suspendedEvents;
4
+ private _suspendAllEvents;
5
+ constructor();
6
+ /**
7
+ * Remove events by name and function.
8
+ * @param name Event name
9
+ * @param f Function pointer to check
10
+ */
11
+ removeEventListener(name: string, f: (param?: unknown) => unknown): number;
12
+ /**
13
+ * Remove all events by name
14
+ * @param name Event name
15
+ */
16
+ removeEventListeners(name: string): number;
17
+ /**
18
+ * Add multiple functions which will be called after the event with the same name is triggered
19
+ * @param name: The name of the event to register
20
+ * @param function: The function to trigger
21
+ * @param keepOnCall: When false, this event name and function combination is removed once triggered.
22
+ * When true Otherwise keep the event and allow it to be triggered multiple times
23
+ * @return: true if the event is registerd, false if it already was registered
24
+ */
25
+ addEventListener(name: string, functionpointer: (param: unknown) => void, keepOnCall?: boolean): boolean;
26
+ /**
27
+ * Destroys this listener, deregistering all events
28
+ */
29
+ destroy(): void;
30
+ /**
31
+ * Suspend a specific event by name, triggers will not be called
32
+ * @param name
33
+ */
34
+ suspendEvent(name: string): void;
35
+ /**
36
+ * Resume a specific event by name, resuming normal operation
37
+ * @param name
38
+ */
39
+ resumeEvent(name: string): void;
40
+ /**
41
+ * This listener will not listen to any triggers
42
+ */
43
+ suspendEvents(): void;
44
+ /**
45
+ * Resume event listening
46
+ */
47
+ resumeEvents(): void;
48
+ /**
49
+ * Trigger an event with custom parameters
50
+ * @param name The name of the event to trigger
51
+ * @param param The parameters to provide to the associated function
52
+ * @returns The results of the function.
53
+ */
54
+ triggerEvent(name: string, param?: unknown): unknown[];
55
+ private removeFinishedEvents;
56
+ removeEvents(name: string, f?: (param?: unknown) => unknown): number;
57
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,31 +1,31 @@
1
- import WMBBOX, { Bbox } from './WMBBOX';
2
- import type IWMJSMap from './IWMJSMap';
3
- declare class MapPin {
4
- private _map;
5
- private x;
6
- private y;
7
- private exactX;
8
- private exactY;
9
- private geoPosX;
10
- private geoPosY;
11
- displayMapPin: boolean;
12
- disableMapPin: boolean;
13
- constructor(_map: IWMJSMap);
14
- redrawMap: () => void;
15
- drawMarker(ctx: CanvasRenderingContext2D): void;
16
- repositionMapPin: (_bbox: WMBBOX) => void;
17
- setMapPin: (_x: number, _y: number, _bbox?: Bbox) => void;
18
- positionMapPinByLatLon: (coord: {
19
- x: number;
20
- y: number;
21
- }) => void;
22
- setMapPinDisabled: () => void;
23
- setMapPinEnabled: () => void;
24
- showMapPin: () => void;
25
- hideMapPin: () => void;
26
- getXY: () => {
27
- x: number;
28
- y: number;
29
- };
30
- }
31
- export default MapPin;
1
+ import WMBBOX, { Bbox } from './WMBBOX';
2
+ import type IWMJSMap from './IWMJSMap';
3
+ declare class MapPin {
4
+ private _map;
5
+ private x;
6
+ private y;
7
+ private exactX;
8
+ private exactY;
9
+ private geoPosX;
10
+ private geoPosY;
11
+ displayMapPin: boolean;
12
+ disableMapPin: boolean;
13
+ constructor(_map: IWMJSMap);
14
+ redrawMap: () => void;
15
+ drawMarker(ctx: CanvasRenderingContext2D): void;
16
+ repositionMapPin: (_bbox: WMBBOX) => void;
17
+ setMapPin: (_x: number, _y: number, _bbox?: Bbox) => void;
18
+ positionMapPinByLatLon: (coord: {
19
+ x: number;
20
+ y: number;
21
+ }) => void;
22
+ setMapPinDisabled: () => void;
23
+ setMapPinEnabled: () => void;
24
+ showMapPin: () => void;
25
+ hideMapPin: () => void;
26
+ getXY: () => {
27
+ x: number;
28
+ y: number;
29
+ };
30
+ }
31
+ export default MapPin;
@@ -1,5 +1,5 @@
1
- export declare class WMMemo {
2
- constructor();
3
- obj: object;
4
- checkIfChanged(obj: object): boolean;
5
- }
1
+ export declare class WMMemo {
2
+ constructor();
3
+ obj: object;
4
+ checkIfChanged(obj: object): boolean;
5
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,9 +1,9 @@
1
- import type IWMJSMap from './IWMJSMap';
2
- export declare function prefetchImagesForAnimation(wmMap: IWMJSMap, maxImagesToPrefetch?: number): void;
3
- interface PrefetchRequest {
4
- url: string;
5
- headers: Headers[];
6
- }
7
- export declare function getLayersImageUrlsForTime(wmMap: IWMJSMap, timeToPrefetch: string): PrefetchRequest[];
8
- export declare function prefetchImagesForNonAnimation(wmMap: IWMJSMap, maxImagesToPrefetch?: number, batchSize?: number): void;
9
- export {};
1
+ import type IWMJSMap from './IWMJSMap';
2
+ export declare function prefetchImagesForAnimation(wmMap: IWMJSMap, maxImagesToPrefetch?: number): void;
3
+ interface PrefetchRequest {
4
+ url: string;
5
+ headers: Headers[];
6
+ }
7
+ export declare function getLayersImageUrlsForTime(wmMap: IWMJSMap, timeToPrefetch: string): PrefetchRequest[];
8
+ export declare function prefetchImagesForNonAnimation(wmMap: IWMJSMap, maxImagesToPrefetch?: number, batchSize?: number): void;
9
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};