@opengeoweb/webmap 2.0.1

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 (61) hide show
  1. package/README.md +11 -0
  2. package/index.d.ts +1 -0
  3. package/lib/components/WMAnimate.d.ts +14 -0
  4. package/lib/components/WMBBOX.d.ts +31 -0
  5. package/lib/components/WMBBOX.spec.d.ts +1 -0
  6. package/lib/components/WMCanvasBuffer.d.ts +116 -0
  7. package/lib/components/WMCanvasBuffer.spec.d.ts +1 -0
  8. package/lib/components/WMConstants.d.ts +28 -0
  9. package/lib/components/WMDrawMarker.d.ts +2 -0
  10. package/lib/components/WMDrawMarker.spec.d.ts +1 -0
  11. package/lib/components/WMFlyToBBox.d.ts +22 -0
  12. package/lib/components/WMFlyToBBox.spec.d.ts +1 -0
  13. package/lib/components/WMGetServiceFromStore.d.ts +3 -0
  14. package/lib/components/WMGlobals.d.ts +7 -0
  15. package/lib/components/WMImage.d.ts +72 -0
  16. package/lib/components/WMImage.spec.d.ts +1 -0
  17. package/lib/components/WMImageStore.d.ts +45 -0
  18. package/lib/components/WMImageStore.spec.d.ts +1 -0
  19. package/lib/components/WMJSDimension.d.ts +89 -0
  20. package/lib/components/WMJSDimension.spec.d.ts +1 -0
  21. package/lib/components/WMJSExternalDependencies.d.ts +3 -0
  22. package/lib/components/WMJSMap.d.ts +310 -0
  23. package/lib/components/WMJSMap.spec.d.ts +1 -0
  24. package/lib/components/WMJSMap.stories.d.ts +6 -0
  25. package/lib/components/WMJSMapHelpers.d.ts +7 -0
  26. package/lib/components/WMJSMapHelpers.spec.d.ts +1 -0
  27. package/lib/components/WMJSService.d.ts +77 -0
  28. package/lib/components/WMJSService.spec.d.ts +1 -0
  29. package/lib/components/WMJSTools.d.ts +60 -0
  30. package/lib/components/WMJSTools.spec.d.ts +1 -0
  31. package/lib/components/WMLayer.d.ts +200 -0
  32. package/lib/components/WMLayer.spec.d.ts +1 -0
  33. package/lib/components/WMLegend.d.ts +6 -0
  34. package/lib/components/WMLegend.spec.d.ts +1 -0
  35. package/lib/components/WMListener.d.ts +14 -0
  36. package/lib/components/WMMapPin.d.ts +24 -0
  37. package/lib/components/WMProjection.d.ts +10 -0
  38. package/lib/components/WMTileRenderer.d.ts +7 -0
  39. package/lib/components/WMTileRenderer.spec.d.ts +1 -0
  40. package/lib/components/WMTime.d.ts +41 -0
  41. package/lib/components/WMTime.spec.d.ts +1 -0
  42. package/lib/components/WMTimeTypes.d.ts +19 -0
  43. package/lib/components/WMTimer.d.ts +11 -0
  44. package/lib/components/WMTimer.spec.d.ts +1 -0
  45. package/lib/components/WMXMLParser.d.ts +9 -0
  46. package/lib/components/WMXMLParser.spec.d.ts +1 -0
  47. package/lib/components/index.d.ts +18 -0
  48. package/lib/components/types.d.ts +37 -0
  49. package/lib/utils/I18n/lang.en.d.ts +387 -0
  50. package/lib/utils/I18n/lang.nl.d.ts +387 -0
  51. package/lib/utils/specs/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +2 -0
  52. package/lib/utils/specs/WMS130GetCapabilitiesHarmN25.d.ts +2 -0
  53. package/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops.d.ts +2 -0
  54. package/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithInheritLayerprops.d.ts +2 -0
  55. package/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops.d.ts +2 -0
  56. package/lib/utils/specs/WMSSmartMet.d.ts +2 -0
  57. package/lib/utils/testUtils.d.ts +35 -0
  58. package/lib/utils/tilesettings.d.ts +335 -0
  59. package/package.json +21 -0
  60. package/webmap.esm.js +9017 -0
  61. package/webmap.umd.js +9014 -0
@@ -0,0 +1,14 @@
1
+ export default class WMListener {
2
+ private _callBacks;
3
+ private _suspendedEvents;
4
+ private _allEventsSuspended;
5
+ constructor();
6
+ addToCallback(name: string, functionpointer: (param?: any) => void, keepOnCall?: boolean): boolean;
7
+ removeEvents(name: string, f: (param?: any) => unknown): void;
8
+ destroy(): void;
9
+ suspendEvent(name: string): void;
10
+ resumeEvent(name: string): void;
11
+ suspendEvents(): void;
12
+ resumeEvents(): void;
13
+ triggerEvent(name: string, param?: unknown): unknown[];
14
+ }
@@ -0,0 +1,24 @@
1
+ import WMBBOX from './WMBBOX';
2
+ import type WMJSMap from './WMJSMap';
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
+ constructor(_map: WMJSMap);
13
+ redrawMap: () => void;
14
+ drawMarker(ctx: CanvasRenderingContext2D): void;
15
+ repositionMapPin: (_bbox?: WMBBOX) => void;
16
+ setMapPin: (_x: number, _y: number, _bbox?: WMBBOX) => void;
17
+ positionMapPinByLatLon: (coord: {
18
+ x: number;
19
+ y: number;
20
+ }) => void;
21
+ showMapPin: () => void;
22
+ hideMapPin: () => void;
23
+ }
24
+ export default MapPin;
@@ -0,0 +1,10 @@
1
+ import WMBBOX from './WMBBOX';
2
+ /**
3
+ * WMProjection Class
4
+ * Keep all projection information, by a bbox and an srs value.
5
+ */
6
+ export default class WMProjection {
7
+ bbox: WMBBOX;
8
+ srs: string;
9
+ constructor();
10
+ }
@@ -0,0 +1,7 @@
1
+ import WMBBOX from './WMBBOX';
2
+ import WMImageStore from './WMImageStore';
3
+ export default class WMTileRenderer {
4
+ render(currentBBOX: WMBBOX, newBBOX: WMBBOX, srs: string, width: number, height: number, ctx: CanvasRenderingContext2D, bgMapImageStore: WMImageStore, tileOptions: any, layerName: string): {
5
+ attributionText: string;
6
+ };
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ import { CustomDate } from './WMTimeTypes';
2
+ /** ************************************************ */
3
+ /** ************************************************ */
4
+ export declare class DateInterval {
5
+ year: number;
6
+ month: number;
7
+ day: number;
8
+ hour: number;
9
+ minute: number;
10
+ second: number;
11
+ isRegularInterval: boolean;
12
+ constructor(year: string, month: string, day: string, hour: string, minute: string, second: string);
13
+ getTime(): number;
14
+ toISO8601(): string;
15
+ }
16
+ export declare const isValidISOTime: (isotime: string) => boolean;
17
+ export declare const parseTimeValue: (value: string) => number;
18
+ export declare const getTimeValues: (isotime: string) => number[];
19
+ /** ************************************************* */
20
+ /** ************************************************* */
21
+ export declare const parseISO8601DateToDate: (_isotime: string) => CustomDate;
22
+ /** ****************************************************** */
23
+ /** ****************************************************** */
24
+ export declare const parseISO8601IntervalToDateInterval: (isotime: string) => DateInterval;
25
+ /** ******************************************************* */
26
+ /** ******************************************************* */
27
+ export declare function getNumberOfTimeSteps(starttime: CustomDate, stoptime: CustomDate, interval: DateInterval): number;
28
+ export declare class ParseISOTimeRangeDuration {
29
+ private initialized;
30
+ startTime: CustomDate;
31
+ stopTime: CustomDate;
32
+ timeInterval: DateInterval;
33
+ timeSteps: number;
34
+ constructor(isoTimeRangeDuration: string);
35
+ getTimeSteps(): number;
36
+ getDateAtTimeStep(currentStep: number): CustomDate;
37
+ getTimeStepFromISODate(currentISODate: string, throwIfOutsideRange: boolean): number;
38
+ getTimeStepFromDate(currentDate: CustomDate, throwIfOutsideRange?: boolean): number;
39
+ getTimeStepFromDateWithinRange(currentDate: CustomDate): number;
40
+ getTimeStepFromDateClipped(currentDate: CustomDate): number;
41
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ declare type DateInterval = {
2
+ year: number;
3
+ month: number;
4
+ day: number;
5
+ hour: number;
6
+ minute: number;
7
+ second: number;
8
+ isRegularInterval: boolean;
9
+ getTime: () => number;
10
+ };
11
+ export interface CustomDate extends Date {
12
+ add: (dateInterval: DateInterval) => void;
13
+ substract: (dateInterval: DateInterval) => void;
14
+ addMultipleTimes: (dateInterval: DateInterval, times: number) => void;
15
+ substractMultipleTimes: (dateInterval: DateInterval, times: number) => void;
16
+ toISO8601: () => string;
17
+ clone: () => CustomDate;
18
+ }
19
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Set the length of the timer, in milli seconds, after time has elapsed function is called
3
+ * @param secstime Time in milli seconds
4
+ * @param functionhandler Function to call after time is elapsed
5
+ */
6
+ declare class WMTimer {
7
+ private timer;
8
+ init(delayInMiliseconds: number, callback: () => void): void;
9
+ stop(): void;
10
+ }
11
+ export default WMTimer;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ declare type WMJSONDocument = any;
2
+ export declare const WMXMLStringToXMLDocument: (xmlString: string) => XMLDocument;
3
+ export declare const WMXMLtoJSON: (xmlDocument: XMLDocument) => WMJSONDocument;
4
+ export declare const WMXMLStringToJson: (xmlString: string) => WMJSONDocument;
5
+ declare const WMXMLParser: (url: string, headers: {
6
+ name: string;
7
+ value: string;
8
+ }[]) => Promise<Record<string, unknown>>;
9
+ export default WMXMLParser;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import WMJSMap from './WMJSMap';
2
+ import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debug, DebugType } from './WMJSTools';
3
+ import WMLayer, { LayerOptions, LayerType } from './WMLayer';
4
+ import WMTimer from './WMTimer';
5
+ import WMGetServiceFromStore from './WMGetServiceFromStore';
6
+ import { WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle } from './WMConstants';
7
+ import { parseISO8601DateToDate, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration } from './WMTime';
8
+ import WMBBOX from './WMBBOX';
9
+ import I18n from '../utils/I18n/lang.en';
10
+ import WMImage from './WMImage';
11
+ import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
12
+ import { getMapImageStore, WMImageEventType } from './WMImageStore';
13
+ import { WMJSService } from './WMJSService';
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, };
16
+ export type { LayerOptions };
17
+ export * from './types';
18
+ export * from './WMTimeTypes';
@@ -0,0 +1,37 @@
1
+ import WMJSDimension from './WMJSDimension';
2
+ import type WMLayer from './WMLayer';
3
+ import { DateInterval } from './WMTime';
4
+ export declare type WMPosition = {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ export declare type LinkedInfoContent = {
9
+ layer: WMLayer;
10
+ message?: string;
11
+ };
12
+ export declare type LinkedInfo = {
13
+ linkedInfo: LinkedInfoContent;
14
+ };
15
+ export declare type Dimension = {
16
+ name?: string;
17
+ units?: string;
18
+ currentValue: string;
19
+ maxValue?: string;
20
+ minValue?: string;
21
+ timeInterval?: DateInterval;
22
+ synced?: boolean;
23
+ values?: string;
24
+ };
25
+ export interface Style {
26
+ title: string;
27
+ name: string;
28
+ legendURL: string;
29
+ abstract: string;
30
+ }
31
+ export declare type WMLayerType = {
32
+ setDimension: (name: string, value: string, updateMapDimensions: boolean) => void;
33
+ getDimension: (name: string) => WMJSDimension;
34
+ dimensions?: WMJSDimension[];
35
+ title?: string;
36
+ headers?: Headers[];
37
+ };
@@ -0,0 +1,387 @@
1
+ declare const _default: {
2
+ delete: {
3
+ text: string;
4
+ };
5
+ delete_selected_flag_tooltip: {
6
+ tooltip: string;
7
+ };
8
+ add_flag_tooltip: {
9
+ tooltip: string;
10
+ };
11
+ are_you_sure: {
12
+ text: string;
13
+ };
14
+ delete_title_confirm: {
15
+ text: string;
16
+ };
17
+ default_selected_flag: {
18
+ text: string;
19
+ };
20
+ selected_flag: {
21
+ text: string;
22
+ };
23
+ add_point_interest_abstract: {
24
+ text: string;
25
+ };
26
+ insert_name: {
27
+ text: string;
28
+ };
29
+ add_point_interest: {
30
+ text: string;
31
+ };
32
+ add: {
33
+ text: string;
34
+ };
35
+ place_search_term: {
36
+ text: string;
37
+ };
38
+ debug_searching_location: {
39
+ text: string;
40
+ };
41
+ debug_searching_sqlite_location: {
42
+ text: string;
43
+ };
44
+ geonames_api_call_failed: {
45
+ text: string;
46
+ };
47
+ geonames_sqlite_call_failed: {
48
+ text: string;
49
+ };
50
+ no_results_search: {
51
+ text: string;
52
+ };
53
+ unable_to_connect_server: {
54
+ text: string;
55
+ };
56
+ unable_to_search: {
57
+ text: string;
58
+ };
59
+ no_urls_in_config: {
60
+ text: string;
61
+ };
62
+ only_alpha_num_allowed: {
63
+ text: string;
64
+ };
65
+ no_search_definition: {
66
+ text: string;
67
+ };
68
+ service_has_error: {
69
+ text: string;
70
+ };
71
+ no_time_dimension_in_layer: {
72
+ text: string;
73
+ };
74
+ no_service_defined: {
75
+ text: string;
76
+ };
77
+ service_url_empty: {
78
+ text: string;
79
+ };
80
+ wms_service_exception_code: {
81
+ text: string;
82
+ };
83
+ unnamed_service: {
84
+ text: string;
85
+ };
86
+ add_layers: {
87
+ text: string;
88
+ tooltip: string;
89
+ };
90
+ add_custom_service: {
91
+ text: string;
92
+ };
93
+ properties_for: {
94
+ text: string;
95
+ };
96
+ color_range: {
97
+ text: string;
98
+ };
99
+ reset: {
100
+ text: string;
101
+ };
102
+ apply: {
103
+ text: string;
104
+ };
105
+ min_value: {
106
+ text: string;
107
+ };
108
+ max_value: {
109
+ text: string;
110
+ };
111
+ wms_version: {
112
+ text: string;
113
+ };
114
+ wms_comp_mode: {
115
+ text: string;
116
+ };
117
+ projections: {
118
+ text: string;
119
+ };
120
+ projection: {
121
+ text: string;
122
+ };
123
+ epsg_code: {
124
+ text: string;
125
+ };
126
+ bounding_box: {
127
+ text: string;
128
+ };
129
+ file_metadata: {
130
+ text: string;
131
+ };
132
+ show_file_metadata: {
133
+ text: string;
134
+ };
135
+ download_data_wcs: {
136
+ text: string;
137
+ };
138
+ coordinate_reference_system: {
139
+ text: string;
140
+ };
141
+ area_bounding_box: {
142
+ text: string;
143
+ };
144
+ dimensions: {
145
+ text: string;
146
+ };
147
+ dimension: {
148
+ text: string;
149
+ };
150
+ formats: {
151
+ text: string;
152
+ };
153
+ north: {
154
+ text: string;
155
+ };
156
+ west: {
157
+ text: string;
158
+ };
159
+ east: {
160
+ text: string;
161
+ };
162
+ south: {
163
+ text: string;
164
+ };
165
+ cell_size: {
166
+ text: string;
167
+ };
168
+ x_resolution: {
169
+ text: string;
170
+ };
171
+ y_resolution: {
172
+ text: string;
173
+ };
174
+ raster_size: {
175
+ text: string;
176
+ };
177
+ raster_width: {
178
+ text: string;
179
+ };
180
+ raster_height: {
181
+ text: string;
182
+ };
183
+ format: {
184
+ text: string;
185
+ };
186
+ show: {
187
+ text: string;
188
+ };
189
+ create_permanent_links: {
190
+ text: string;
191
+ };
192
+ please_select_product: {
193
+ text: string;
194
+ };
195
+ no_capability_element_found: {
196
+ text: string;
197
+ };
198
+ no_wms_capability_element_found: {
199
+ text: string;
200
+ };
201
+ no_wms_layer_element_found: {
202
+ text: string;
203
+ };
204
+ settings_and_options: {
205
+ tooltip: string;
206
+ };
207
+ show_time_selection_window: {
208
+ text: string;
209
+ };
210
+ create_animation: {
211
+ text: string;
212
+ };
213
+ create_link: {
214
+ text: string;
215
+ };
216
+ show_debug_information: {
217
+ text: string;
218
+ };
219
+ add_custom_wms_service: {
220
+ text: string;
221
+ };
222
+ undo_zoom_pan_action: {
223
+ text: string;
224
+ };
225
+ redo_zoom_pan_action: {
226
+ text: string;
227
+ };
228
+ abort_loading: {
229
+ text: string;
230
+ };
231
+ about_the_adaguc_viewer: {
232
+ text: string;
233
+ tooptip: string;
234
+ };
235
+ about_adaguc: {
236
+ text: string;
237
+ };
238
+ about_adaguc_more_information: {
239
+ text: string;
240
+ };
241
+ layers: {
242
+ text: string;
243
+ tooltip: string;
244
+ };
245
+ predefined_areas: {
246
+ tooltip: string;
247
+ };
248
+ basemaps_overlays: {
249
+ tooltip: string;
250
+ };
251
+ add_layers_and_services: {
252
+ text: string;
253
+ };
254
+ add_new_layer: {
255
+ tooltip: string;
256
+ };
257
+ clone_this_layer: {
258
+ tooltip: string;
259
+ };
260
+ remove_this_layer: {
261
+ tooltip: string;
262
+ };
263
+ move_layer_up: {
264
+ tooltip: string;
265
+ };
266
+ move_layer_down: {
267
+ tooltip: string;
268
+ };
269
+ title: {
270
+ text: string;
271
+ };
272
+ layer: {
273
+ text: string;
274
+ };
275
+ type: {
276
+ text: string;
277
+ };
278
+ name: {
279
+ text: string;
280
+ };
281
+ abstract: {
282
+ text: string;
283
+ };
284
+ service: {
285
+ text: string;
286
+ };
287
+ description: {
288
+ text: string;
289
+ };
290
+ no_dimensions_available: {
291
+ text: string;
292
+ };
293
+ load_all: {
294
+ text: string;
295
+ };
296
+ play_animation: {
297
+ text: string;
298
+ };
299
+ stop: {
300
+ text: string;
301
+ };
302
+ start: {
303
+ text: string;
304
+ };
305
+ opacity: {
306
+ text: string;
307
+ };
308
+ zoom_to_this_layer: {
309
+ tooltip: string;
310
+ };
311
+ start_or_stop_animation: {
312
+ tooltip: string;
313
+ };
314
+ reload_this_layer: {
315
+ tooltip: string;
316
+ };
317
+ layer_properties: {
318
+ tooltip: string;
319
+ };
320
+ hide_or_display_layer: {
321
+ tooltip: string;
322
+ };
323
+ select_layer_product_from_service: {
324
+ tooltip: string;
325
+ };
326
+ change_style_layer: {
327
+ tooltip: string;
328
+ };
329
+ available_styles: {
330
+ text: string;
331
+ };
332
+ no_styles_available: {
333
+ text: string;
334
+ };
335
+ default: {
336
+ text: string;
337
+ };
338
+ embed: {
339
+ text: string;
340
+ };
341
+ time_selection: {
342
+ text: string;
343
+ };
344
+ local_time: {
345
+ text: string;
346
+ };
347
+ year: {
348
+ text: string;
349
+ };
350
+ month: {
351
+ text: string;
352
+ };
353
+ day: {
354
+ text: string;
355
+ };
356
+ hour: {
357
+ text: string;
358
+ };
359
+ min: {
360
+ text: string;
361
+ };
362
+ select_layer: {
363
+ text: string;
364
+ };
365
+ select_dimension: {
366
+ text: string;
367
+ };
368
+ start_at: {
369
+ text: string;
370
+ };
371
+ number_of_steps: {
372
+ text: string;
373
+ };
374
+ delay_ms: {
375
+ text: string;
376
+ };
377
+ enter_wms_version_url: {
378
+ text: string;
379
+ };
380
+ enter_search_term: {
381
+ text: string;
382
+ };
383
+ not_available_message: {
384
+ text: string;
385
+ };
386
+ };
387
+ export default _default;