@opengeoweb/webmap 9.28.1 → 9.29.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 (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,69 +1,69 @@
1
- import { LayerProps, LayerTree, WMSLayerFromGetCapabilities } from './types';
2
- import WMListener from './WMListener';
3
- export declare const wmServiceListener: WMListener;
4
- export interface GetCapabilitiesJson {
5
- WMS_Capabilities?: any;
6
- WMT_MS_Capabilities?: any;
7
- ServiceExceptionReport?: any;
8
- }
9
- export interface Capability {
10
- Layer: WMSLayerFromGetCapabilities;
11
- Request: any;
12
- }
13
- export declare const loadGetCapabilitiesViaProxy: (url: string, succes: (jsonData: GetCapabilitiesJson) => void, fail: (param: string) => void, xml2jsonrequestURL: string) => void;
14
- export declare const getWMSUrl: (service?: string, additionalParams?: {}) => string;
15
- /**
16
- * Global getcapabilities function
17
- */
18
- export declare const WMJSGetCapabilities: (service: string, succes: (jsonData: GetCapabilitiesJson) => void, fail: (param: string) => void, options: {
19
- headers?: {
20
- name: string;
21
- value: string;
22
- }[];
23
- }, disableCache?: boolean) => void;
24
- /**
25
- * WMJSService Class
26
- *
27
- * options:
28
- * service
29
- * title (optional)
30
- */
31
- export declare class WMJSService {
32
- id: string;
33
- service: string;
34
- title: string;
35
- onlineresource: string;
36
- abstract: string;
37
- version: string;
38
- getcapabilitiesDoc: GetCapabilitiesJson;
39
- busy: boolean;
40
- _flatLayerObject: LayerProps[] | undefined;
41
- functionCallbackList: any[];
42
- _options: any;
43
- constructor(options: {
44
- service: string;
45
- title?: string;
46
- });
47
- checkVersion111(jsonData: GetCapabilitiesJson): void;
48
- checkVersion130(jsonData: GetCapabilitiesJson): void;
49
- getCapabilityElement(jsonData: GetCapabilitiesJson): Capability;
50
- checkVersion(jsonData: GetCapabilitiesJson): string;
51
- /**
52
- * Does getcapabilities for a service.
53
- * When multple getCapabilities for the same service are made,
54
- * this method makes one get request and fires all callbacks with the same result.
55
- * @param succescallback Function called upon succes, cannot be left blank
56
- * @param failcallback Function called upon failure, cannot be left blank
57
- */
58
- getCapabilities(succescallback: (jsonData: GetCapabilitiesJson) => void, failcallback: (jsonData: string) => void, forceReload: boolean, options: any): void;
59
- checkException(jsonData: GetCapabilitiesJson): string | undefined;
60
- /**
61
- * Calls succes with a hierarchical node structure
62
- * Calls failure with a string when someting goes wrong
63
- */
64
- getNodes(succes: (layerTreeStructure: LayerTree) => void, failure: (msg: string) => void, forceReload: boolean, options?: unknown): void;
65
- /** Calls succes with an array of all layerobjects
66
- * Calls failure when something goes wrong
67
- */
68
- getLayerObjectsFlat(succes: (layers: LayerProps[]) => void, failure: (message: string) => void, forceReload: boolean, options?: any): void;
69
- }
1
+ import { LayerProps, LayerTree, WMSLayerFromGetCapabilities } from './types';
2
+ import WMListener from './WMListener';
3
+ export declare const wmServiceListener: WMListener;
4
+ export interface GetCapabilitiesJson {
5
+ WMS_Capabilities?: any;
6
+ WMT_MS_Capabilities?: any;
7
+ ServiceExceptionReport?: any;
8
+ }
9
+ export interface Capability {
10
+ Layer: WMSLayerFromGetCapabilities;
11
+ Request: any;
12
+ }
13
+ export declare const loadGetCapabilitiesViaProxy: (url: string, succes: (jsonData: GetCapabilitiesJson) => void, fail: (param: string) => void, xml2jsonrequestURL: string) => void;
14
+ export declare const getWMSUrl: (service?: string, additionalParams?: {}) => string;
15
+ /**
16
+ * Global getcapabilities function
17
+ */
18
+ export declare const WMJSGetCapabilities: (service: string, succes: (jsonData: GetCapabilitiesJson) => void, fail: (param: string) => void, options: {
19
+ headers?: {
20
+ name: string;
21
+ value: string;
22
+ }[];
23
+ }, disableCache?: boolean) => void;
24
+ /**
25
+ * WMJSService Class
26
+ *
27
+ * options:
28
+ * service
29
+ * title (optional)
30
+ */
31
+ export declare class WMJSService {
32
+ id: string;
33
+ service: string;
34
+ title: string;
35
+ onlineresource: string;
36
+ abstract: string;
37
+ version: string;
38
+ getcapabilitiesDoc: GetCapabilitiesJson;
39
+ busy: boolean;
40
+ _flatLayerObject: LayerProps[] | undefined;
41
+ functionCallbackList: any[];
42
+ _options: any;
43
+ constructor(options: {
44
+ service: string;
45
+ title?: string;
46
+ });
47
+ checkVersion111(jsonData: GetCapabilitiesJson): void;
48
+ checkVersion130(jsonData: GetCapabilitiesJson): void;
49
+ getCapabilityElement(jsonData: GetCapabilitiesJson): Capability;
50
+ checkVersion(jsonData: GetCapabilitiesJson): string;
51
+ /**
52
+ * Does getcapabilities for a service.
53
+ * When multple getCapabilities for the same service are made,
54
+ * this method makes one get request and fires all callbacks with the same result.
55
+ * @param succescallback Function called upon succes, cannot be left blank
56
+ * @param failcallback Function called upon failure, cannot be left blank
57
+ */
58
+ getCapabilities(succescallback: (jsonData: GetCapabilitiesJson) => void, failcallback: (jsonData: string) => void, forceReload: boolean, options: any): void;
59
+ checkException(jsonData: GetCapabilitiesJson): string | undefined;
60
+ /**
61
+ * Calls succes with a hierarchical node structure
62
+ * Calls failure with a string when someting goes wrong
63
+ */
64
+ getNodes(succes: (layerTreeStructure: LayerTree) => void, failure: (msg: string) => void, forceReload: boolean, options?: unknown): void;
65
+ /** Calls succes with an array of all layerobjects
66
+ * Calls failure when something goes wrong
67
+ */
68
+ getLayerObjectsFlat(succes: (layers: LayerProps[]) => void, failure: (message: string) => void, forceReload: boolean, options?: any): void;
69
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,100 +1,100 @@
1
- import type { Dimension, GeographicBoundingBox, LayerProps, LayerTree, Style, WMSLayerFromGetCapabilities } from './types';
2
- import type WMLayer from './WMLayer';
3
- export declare const enableConsoleDebugging = false;
4
- export declare enum DebugType {
5
- Log = 0,
6
- Warning = 1,
7
- Error = 2
8
- }
9
- export declare const debugLogger: (type: DebugType, message: string, ...optionalParam: unknown[]) => void;
10
- /**
11
- * Checks if variable is defined or not
12
- * @param variable The variable to check
13
- * @returns true if variable is indeed defined, otherwise false.
14
- */
15
- export declare const isDefined: <T>(variable?: T | undefined) => variable is T;
16
- /**
17
- * Checks if a variable is null or not
18
- * @param variable The variable to check
19
- * @returns true if variable is indeed null, otherwise false.
20
- */
21
- export declare const isNull: (variable: any) => boolean;
22
- /**
23
- * Converts a variable to an array. If the variable is not an array it will be pushed as the first entry in a new array. If the variable is already an array, nothing will be done.
24
- * @param array The variable to convert
25
- * @returns Always an array
26
- */
27
- export declare const toArray: (array: unknown | unknown[]) => any[];
28
- /**
29
- * Function which checks wether URL contains a ? token. If not, it is assumed that this token was not provided by the user,
30
- * manually add the token later.
31
- * @param url The URL to check
32
- * @return the fixed URL
33
- */
34
- export declare const WMJScheckURL: (url: string) => string;
35
- export declare const preventdefaultEvent: (e: Event) => void;
36
- export declare const getMouseXCoordinate: (event: MouseEvent) => number;
37
- export declare const getMouseYCoordinate: (event: MouseEvent) => number;
38
- export declare const URLDecode: (encodedURL: string) => string;
39
- export declare const URLEncode: (plaintext: string) => string;
40
- export declare const getCorrectWMSDimName: (origDimName: string) => string;
41
- export declare const getMapDimURL: (layer: WMLayer, dimensionOverride?: Dimension[]) => string;
42
- /**
43
- * Parses url and then it it allows for setting / changing key value pairs in that URL (From https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter)
44
- * @param baseUrl
45
- * @param params
46
- * @returns
47
- */
48
- export declare const getUriWithParam: (baseUrl: string, params?: Record<string, any>) => string;
49
- /**
50
- * Parses url and then it it allows for setting additional key value pairs in that URL (From https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter)
51
- * @param baseUrl
52
- * @param params
53
- * @returns
54
- */
55
- export declare const getUriAddParam: (baseUrl: string, params: Record<string, any>) => string;
56
- /**
57
- * Converts a JS date to a ISO8601 string
58
- * @param date
59
- * @returns ISO8601 string
60
- */
61
- export declare const dateToISO8601: (date: Date) => string;
62
- /**
63
- * Helper function to figure out the styles from the WMS layer object from the WMS GetCapabilities document
64
- * @param layerObjectFromWMS The layer object from the WMS GetCapabilities JSON document
65
- * @returns Style[] Array of style objects.
66
- */
67
- export declare const addStylesForLayer: (layerObjectFromWMS: WMSLayerFromGetCapabilities) => Style[];
68
- export declare const addDimensionsForLayer: (layerObjectFromWMS: WMSLayerFromGetCapabilities) => Dimension[];
69
- export declare const addBoundingBoxForLayer: (layerObjectFromWMS: WMSLayerFromGetCapabilities) => GeographicBoundingBox | undefined;
70
- /**
71
- * Sorts an array with objects by object key.
72
- *
73
- * @param array Array of objects
74
- * @param key The key of the object to use for sorting
75
- * @returns Sorted array.
76
- */
77
- export declare function sortArrayOfObjectsByKey<ArrayOfObjects>(array: ArrayOfObjects[], key: string): ArrayOfObjects[];
78
- /**
79
- * A LayerTree with deeply nested children will be flattened into a 1D array. Children properties are removed and result is sorted alphabetically by the layers title.
80
- * @param layerTree a WMS LayerTree
81
- * @returns Flat array of layers as LayerProps[]
82
- */
83
- export declare const flattenLayerTree: (layerTree: LayerTree) => LayerProps[];
84
- /**
85
- * Makes a LayerProps object from the WMSLayerFromGetCapabilities and nestedLayerPath
86
- * @param layer WMSLayerFromGetCapabilities
87
- * @param path The path of the layer in the WMS GetCapabilities tree (Array of strings)
88
- * @param isleaf Is this a group layer or an actual layer
89
- * @param nestedLayerPath The path of the layer in the WMS GetCapabilities, in this case array of LayerProps
90
- * @returns
91
- */
92
- export declare const makeNodeLayerFromWMSGetCapabilityLayer: (layer: WMSLayerFromGetCapabilities, path?: string[], isleaf?: boolean, nestedLayerPath?: LayerProps[]) => LayerProps;
93
- /**
94
- * Builds a standardized LayerTree object based on WMSLayerFromGetCapabilities object.
95
- * @param wmsLayer The WMSLayerFromGetCapabilities object
96
- * @param nestedPath - Optional, only to be used by buildLayerTreeFromNestedWMSLayer
97
- * @param nestedLayerPath - Optional, only to be used by buildLayerTreeFromNestedWMSLayer
98
- * @returns A LayerTree object.
99
- */
100
- export declare const buildLayerTreeFromNestedWMSLayer: (wmsLayer: WMSLayerFromGetCapabilities, nestedPath?: string[], nestedLayerPath?: LayerProps[]) => LayerTree;
1
+ import type { Dimension, GeographicBoundingBox, LayerProps, LayerTree, Style, WMSLayerFromGetCapabilities } from './types';
2
+ import type WMLayer from './WMLayer';
3
+ export declare const enableConsoleDebugging = false;
4
+ export declare enum DebugType {
5
+ Log = 0,
6
+ Warning = 1,
7
+ Error = 2
8
+ }
9
+ export declare const debugLogger: (type: DebugType, message: string, ...optionalParam: unknown[]) => void;
10
+ /**
11
+ * Checks if variable is defined or not
12
+ * @param variable The variable to check
13
+ * @returns true if variable is indeed defined, otherwise false.
14
+ */
15
+ export declare const isDefined: <T>(variable?: T | undefined) => variable is T;
16
+ /**
17
+ * Checks if a variable is null or not
18
+ * @param variable The variable to check
19
+ * @returns true if variable is indeed null, otherwise false.
20
+ */
21
+ export declare const isNull: (variable: any) => boolean;
22
+ /**
23
+ * Converts a variable to an array. If the variable is not an array it will be pushed as the first entry in a new array. If the variable is already an array, nothing will be done.
24
+ * @param array The variable to convert
25
+ * @returns Always an array
26
+ */
27
+ export declare const toArray: (array: unknown | unknown[]) => any[];
28
+ /**
29
+ * Function which checks wether URL contains a ? token. If not, it is assumed that this token was not provided by the user,
30
+ * manually add the token later.
31
+ * @param url The URL to check
32
+ * @return the fixed URL
33
+ */
34
+ export declare const WMJScheckURL: (url: string) => string;
35
+ export declare const preventdefaultEvent: (event: Event) => void;
36
+ export declare const getMouseXCoordinate: (event: MouseEvent) => number;
37
+ export declare const getMouseYCoordinate: (event: MouseEvent) => number;
38
+ export declare const URLDecode: (encodedURL: string) => string;
39
+ export declare const URLEncode: (plaintext: string) => string;
40
+ export declare const getCorrectWMSDimName: (origDimName: string) => string;
41
+ export declare const getMapDimURL: (layer: WMLayer, dimensionOverride?: Dimension[]) => string;
42
+ /**
43
+ * Parses url and then it it allows for setting / changing key value pairs in that URL (From https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter)
44
+ * @param baseUrl
45
+ * @param params
46
+ * @returns
47
+ */
48
+ export declare const getUriWithParam: (baseUrl: string, params?: Record<string, any>) => string;
49
+ /**
50
+ * Parses url and then it it allows for setting additional key value pairs in that URL (From https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter)
51
+ * @param baseUrl
52
+ * @param params
53
+ * @returns
54
+ */
55
+ export declare const getUriAddParam: (baseUrl: string, params: Record<string, any>) => string;
56
+ /**
57
+ * Converts a JS date to a ISO8601 string
58
+ * @param date
59
+ * @returns ISO8601 string
60
+ */
61
+ export declare const dateToISO8601: (date: Date) => string;
62
+ /**
63
+ * Helper function to figure out the styles from the WMS layer object from the WMS GetCapabilities document
64
+ * @param layerObjectFromWMS The layer object from the WMS GetCapabilities JSON document
65
+ * @returns Style[] Array of style objects.
66
+ */
67
+ export declare const addStylesForLayer: (layerObjectFromWMS: WMSLayerFromGetCapabilities) => Style[];
68
+ export declare const addDimensionsForLayer: (layerObjectFromWMS: WMSLayerFromGetCapabilities) => Dimension[];
69
+ export declare const addBoundingBoxForLayer: (layerObjectFromWMS: WMSLayerFromGetCapabilities) => GeographicBoundingBox | undefined;
70
+ /**
71
+ * Sorts an array with objects by object key.
72
+ *
73
+ * @param array Array of objects
74
+ * @param key The key of the object to use for sorting
75
+ * @returns Sorted array.
76
+ */
77
+ export declare function sortArrayOfObjectsByKey<ArrayOfObjects>(array: ArrayOfObjects[], key: string): ArrayOfObjects[];
78
+ /**
79
+ * A LayerTree with deeply nested children will be flattened into a 1D array. Children properties are removed and result is sorted alphabetically by the layers title.
80
+ * @param layerTree a WMS LayerTree
81
+ * @returns Flat array of layers as LayerProps[]
82
+ */
83
+ export declare const flattenLayerTree: (layerTree: LayerTree) => LayerProps[];
84
+ /**
85
+ * Makes a LayerProps object from the WMSLayerFromGetCapabilities and nestedLayerPath
86
+ * @param layer WMSLayerFromGetCapabilities
87
+ * @param path The path of the layer in the WMS GetCapabilities tree (Array of strings)
88
+ * @param isleaf Is this a group layer or an actual layer
89
+ * @param nestedLayerPath The path of the layer in the WMS GetCapabilities, in this case array of LayerProps
90
+ * @returns
91
+ */
92
+ export declare const makeNodeLayerFromWMSGetCapabilityLayer: (layer: WMSLayerFromGetCapabilities, path?: string[], isleaf?: boolean, nestedLayerPath?: LayerProps[]) => LayerProps;
93
+ /**
94
+ * Builds a standardized LayerTree object based on WMSLayerFromGetCapabilities object.
95
+ * @param wmsLayer The WMSLayerFromGetCapabilities object
96
+ * @param nestedPath - Optional, only to be used by buildLayerTreeFromNestedWMSLayer
97
+ * @param nestedLayerPath - Optional, only to be used by buildLayerTreeFromNestedWMSLayer
98
+ * @returns A LayerTree object.
99
+ */
100
+ export declare const buildLayerTreeFromNestedWMSLayer: (wmsLayer: WMSLayerFromGetCapabilities, nestedPath?: string[], nestedLayerPath?: LayerProps[]) => LayerTree;
@@ -1 +1 @@
1
- export {};
1
+ export {};