@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,16 +1,16 @@
1
- import WMBBOX, { Bbox } 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
- }
11
- export interface WMProjectionWH {
12
- bbox: Bbox;
13
- srs: string;
14
- width: number;
15
- height: number;
16
- }
1
+ import WMBBOX, { Bbox } 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
+ }
11
+ export interface WMProjectionWH {
12
+ bbox: Bbox;
13
+ srs: string;
14
+ width: number;
15
+ height: number;
16
+ }
@@ -1,7 +1,7 @@
1
- import { EPSGCode } from '@opengeoweb/shared';
2
- import type { TileServerMap, TileSettings } from '../utils';
3
- import WMBBOX from './WMBBOX';
4
- import WMImageStore from './WMImageStore';
5
- export default class WMTileRenderer {
6
- render(currentBBOX: WMBBOX, newBBOX: WMBBOX, srs: EPSGCode, width: number, height: number, ctx: CanvasRenderingContext2D, bgMapImageStore: WMImageStore, tileOptions: TileServerMap, layerName: string): TileSettings | undefined;
7
- }
1
+ import { EPSGCode } from '@opengeoweb/shared';
2
+ import type { TileServerMap, TileSettings } from '../utils';
3
+ import WMBBOX from './WMBBOX';
4
+ import WMImageStore from './WMImageStore';
5
+ export default class WMTileRenderer {
6
+ render(currentBBOX: WMBBOX, newBBOX: WMBBOX, srs: EPSGCode, width: number, height: number, ctx: CanvasRenderingContext2D, bgMapImageStore: WMImageStore, tileOptions: TileServerMap, layerName: string): TileSettings | undefined;
7
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,43 +1,43 @@
1
- import { CustomDate } from './WMTimeTypes';
2
- import { TimeInterval } from './types';
3
- /** ************************************************ */
4
- /** ************************************************ */
5
- export declare class DateInterval implements TimeInterval {
6
- year: number;
7
- month: number;
8
- day: number;
9
- hour: number;
10
- minute: number;
11
- second: number;
12
- isRegularInterval: boolean;
13
- constructor(year: string, month: string, day: string, hour: string, minute: string, second: string);
14
- getTime(): number;
15
- toISO8601(): string;
16
- }
17
- export declare const isValidISOTime: (isotime: string) => boolean;
18
- export declare const parseTimeValue: (value: string) => number;
19
- export declare const getTimeValues: (isotime: string) => number[];
20
- /** ************************************************* */
21
- /** ************************************************* */
22
- export declare const parseISO8601DateToDate: (unvalidatedIsotime: string) => CustomDate;
23
- /** ****************************************************** */
24
- /** ****************************************************** */
25
- export declare const parseISO8601IntervalToDateInterval: (_isotime: string) => DateInterval;
26
- /** ******************************************************* */
27
- /** ******************************************************* */
28
- export declare function getNumberOfTimeSteps(starttime: CustomDate, stoptime: CustomDate, interval: DateInterval): number;
29
- export declare class ParseISOTimeRangeDuration {
30
- private initialized;
31
- startTime: CustomDate;
32
- stopTime: CustomDate;
33
- timeInterval: DateInterval;
34
- timeSteps: number;
35
- constructor(isoTimeRangeDuration: string);
36
- getTimeSteps(): number;
37
- getDateAtTimeStep(currentStep: number): CustomDate;
38
- getTimeStepFromISODate(currentISODate: string, throwIfOutsideRange: boolean): number;
39
- getTimeStepFromDate(wantedDate: CustomDate, throwIfOutsideRange?: boolean): number;
40
- getTimeStepFromDateWithinRange(currentDate: CustomDate): number;
41
- getTimeStepFromDateClipped(currentDate: CustomDate): number;
42
- }
43
- export declare function calculateTimeIntervalFromList(dateStrings: string[]): DateInterval;
1
+ import { CustomDate } from './WMTimeTypes';
2
+ import { TimeInterval } from './types';
3
+ /** ************************************************ */
4
+ /** ************************************************ */
5
+ export declare class DateInterval implements TimeInterval {
6
+ year: number;
7
+ month: number;
8
+ day: number;
9
+ hour: number;
10
+ minute: number;
11
+ second: number;
12
+ isRegularInterval: boolean;
13
+ constructor(year: string, month: string, day: string, hour: string, minute: string, second: string);
14
+ getTime(): number;
15
+ toISO8601(): string;
16
+ }
17
+ export declare const isValidISOTime: (isotime: string) => boolean;
18
+ export declare const parseTimeValue: (value: string) => number;
19
+ export declare const getTimeValues: (isotime: string) => number[];
20
+ /** ************************************************* */
21
+ /** ************************************************* */
22
+ export declare const parseISO8601DateToDate: (unvalidatedIsotime: string) => CustomDate;
23
+ /** ****************************************************** */
24
+ /** ****************************************************** */
25
+ export declare const parseISO8601IntervalToDateInterval: (_isotime: string) => DateInterval;
26
+ /** ******************************************************* */
27
+ /** ******************************************************* */
28
+ export declare function getNumberOfTimeSteps(starttime: CustomDate, stoptime: CustomDate, interval: DateInterval): number;
29
+ export declare class ParseISOTimeRangeDuration {
30
+ private initialized;
31
+ startTime: CustomDate;
32
+ stopTime: CustomDate;
33
+ timeInterval: DateInterval;
34
+ timeSteps: number;
35
+ constructor(isoTimeRangeDuration: string);
36
+ getTimeSteps(): number;
37
+ getDateAtTimeStep(currentStep: number): CustomDate;
38
+ getTimeStepFromISODate(currentISODate: string, throwIfOutsideRange: boolean): number;
39
+ getTimeStepFromDate(wantedDate: CustomDate, throwIfOutsideRange?: boolean): number;
40
+ getTimeStepFromDateWithinRange(currentDate: CustomDate): number;
41
+ getTimeStepFromDateClipped(currentDate: CustomDate): number;
42
+ }
43
+ export declare function calculateTimeIntervalFromList(dateStrings: string[]): DateInterval;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,19 +1,19 @@
1
- interface 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 {};
1
+ interface 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 {};
@@ -1,11 +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;
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;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,9 +1,9 @@
1
- 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;
1
+ 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;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,24 +1,24 @@
1
- import type IWMJSMap from './IWMJSMap';
2
- import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType, getUriWithParam } from './WMJSTools';
3
- import WMGetServiceFromStore from './WMGetServiceFromStore';
4
- import { parseISO8601DateToDate, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration } from './WMTime';
5
- import WMImage from './WMImage';
6
- import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
7
- import { WMImageEventType } from './WMImageStore';
8
- import { WMJSService, wmServiceListener } from './WMJSService';
9
- import WMListener from './WMListener';
10
- import WMJSMap from './WMJSMap';
11
- import WMProjection from './WMProjection';
12
- export { default as WMJSDimension, handleDateUtilsISOString, } from './WMJSDimension';
13
- export { default as WMLayer, LayerType } from './WMLayer';
14
- export type { LayerOptions, LayerFoundation } from './WMLayer';
15
- export { default as WMBBOX } from './WMBBOX';
16
- export type { Bbox } from './WMBBOX';
17
- export type { WMProjectionWH } from './WMProjection';
18
- export { WMProjection };
19
- export { IWMJSMap, WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, WMJSService, getUriWithParam, wmServiceListener, WMListener, };
20
- export * from './types';
21
- export * from './WMTimeTypes';
22
- export * from './WMConstants';
23
- export * from './WMJSMapHelpers';
24
- export * from './WMCanvasDrawFunctions';
1
+ import type IWMJSMap from './IWMJSMap';
2
+ import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType, getUriWithParam } from './WMJSTools';
3
+ import WMGetServiceFromStore from './WMGetServiceFromStore';
4
+ import { parseISO8601DateToDate, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration } from './WMTime';
5
+ import WMImage from './WMImage';
6
+ import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
7
+ import { WMImageEventType } from './WMImageStore';
8
+ import { WMJSService, wmServiceListener } from './WMJSService';
9
+ import WMListener from './WMListener';
10
+ import WMJSMap from './WMJSMap';
11
+ import WMProjection from './WMProjection';
12
+ export { default as WMJSDimension, handleDateUtilsISOString, } from './WMJSDimension';
13
+ export { default as WMLayer, LayerType } from './WMLayer';
14
+ export type { LayerOptions, LayerFoundation } from './WMLayer';
15
+ export { default as WMBBOX } from './WMBBOX';
16
+ export type { Bbox } from './WMBBOX';
17
+ export type { WMProjectionWH } from './WMProjection';
18
+ export { WMProjection };
19
+ export { IWMJSMap, WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, WMJSService, getUriWithParam, wmServiceListener, WMListener, };
20
+ export * from './types';
21
+ export * from './WMTimeTypes';
22
+ export * from './WMConstants';
23
+ export * from './WMJSMapHelpers';
24
+ export * from './WMCanvasDrawFunctions';
@@ -1,174 +1,174 @@
1
- import proj4 from 'proj4';
2
- import type WMJSDimension from './WMJSDimension';
3
- import type WMLayer from './WMLayer';
4
- import { Bbox } from './WMBBOX';
5
- import type WMImage from './WMImage';
6
- import type IWMJSMap from './IWMJSMap';
7
- export interface AnimationStep {
8
- name: string;
9
- value: string;
10
- requests?: {
11
- url: string;
12
- headers: Headers[];
13
- }[];
14
- imagesInPrefetch?: WMImage[];
15
- }
16
- export interface WMPosition {
17
- x: number;
18
- y: number;
19
- }
20
- export interface LinkedInfoContent {
21
- layer: WMLayer;
22
- message?: string;
23
- }
24
- export interface LinkedInfo {
25
- linkedInfo: LinkedInfoContent;
26
- }
27
- export interface TimeInterval {
28
- year: number;
29
- month: number;
30
- day: number;
31
- hour: number;
32
- minute: number;
33
- second: number;
34
- isRegularInterval: boolean;
35
- }
36
- export interface Dimension {
37
- name?: string;
38
- units?: string;
39
- currentValue: string;
40
- maxValue?: string;
41
- minValue?: string;
42
- timeInterval?: TimeInterval;
43
- synced?: boolean;
44
- values?: string;
45
- unitSymbol?: string;
46
- validSyncSelection?: boolean;
47
- }
48
- export interface Style {
49
- title: string;
50
- name: string;
51
- legendURL: string;
52
- abstract: string;
53
- }
54
- export interface GeographicBoundingBox {
55
- west: string;
56
- east: string;
57
- north: string;
58
- south: string;
59
- }
60
- export interface WMLayerType {
61
- setDimension: (name: string, value: string, updateMapDimensions: boolean) => void;
62
- getDimension: (name: string) => WMJSDimension;
63
- dimensions?: WMJSDimension[];
64
- title?: string;
65
- headers?: Headers[];
66
- }
67
- export interface CoordinateReferenceSystem {
68
- name?: string;
69
- bbox?: Bbox;
70
- }
71
- export interface LayerProps {
72
- name: string | null;
73
- leaf: boolean;
74
- path: string[];
75
- title: string;
76
- abstract?: string;
77
- keywords?: string[];
78
- styles?: Style[];
79
- dimensions?: Dimension[];
80
- geographicBoundingBox?: GeographicBoundingBox | undefined;
81
- queryable?: boolean;
82
- crs?: CoordinateReferenceSystem[];
83
- }
84
- /**
85
- * Represents the layers as advertised in the WMS GetCapabilities document
86
- */
87
- export interface LayerTree extends LayerProps {
88
- children: LayerTree[];
89
- }
90
- export interface WMSBoundingBox {
91
- attr: {
92
- SRS?: string;
93
- CRS?: string;
94
- maxy: string;
95
- miny: string;
96
- maxx: string;
97
- minx: string;
98
- };
99
- }
100
- /**
101
- * This interface is for reading from the WMS GetCapabilities document, which can have different structures for V1.1.1 and V1.3.0
102
- */
103
- export interface WMSLayerFromGetCapabilities {
104
- attr: {
105
- queryable: string;
106
- opaque: string;
107
- cascaded: string;
108
- };
109
- Name: {
110
- attr: Record<string, unknown>;
111
- value: string;
112
- };
113
- Title: {
114
- attr: Record<string, unknown>;
115
- value: string;
116
- };
117
- Dimension: unknown;
118
- Style: unknown;
119
- Extent: unknown;
120
- ScaleHint: unknown;
121
- Abstract: {
122
- value: string;
123
- };
124
- KeywordList: {
125
- Keyword: unknown;
126
- };
127
- Layer: WMSLayerFromGetCapabilities | WMSLayerFromGetCapabilities[];
128
- EX_GeographicBoundingBox?: {
129
- northBoundLatitude: {
130
- attr: Record<string, unknown>;
131
- value: string;
132
- };
133
- southBoundLatitude: {
134
- attr: Record<string, unknown>;
135
- value: string;
136
- };
137
- westBoundLongitude: {
138
- attr: Record<string, unknown>;
139
- value: string;
140
- };
141
- eastBoundLongitude: {
142
- attr: Record<string, unknown>;
143
- value: string;
144
- };
145
- };
146
- LatLonBoundingBox?: {
147
- attr: {
148
- maxy: string;
149
- miny: string;
150
- maxx: string;
151
- minx: string;
152
- };
153
- };
154
- BoundingBox?: WMSBoundingBox[];
155
- SRS?: {
156
- value: string;
157
- }[];
158
- }
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
- }
1
+ import proj4 from 'proj4';
2
+ import type WMJSDimension from './WMJSDimension';
3
+ import type WMLayer from './WMLayer';
4
+ import { Bbox } from './WMBBOX';
5
+ import type WMImage from './WMImage';
6
+ import type IWMJSMap from './IWMJSMap';
7
+ export interface AnimationStep {
8
+ name: string;
9
+ value: string;
10
+ requests?: {
11
+ url: string;
12
+ headers: Headers[];
13
+ }[];
14
+ imagesInPrefetch?: WMImage[];
15
+ }
16
+ export interface WMPosition {
17
+ x: number;
18
+ y: number;
19
+ }
20
+ export interface LinkedInfoContent {
21
+ layer: WMLayer;
22
+ message?: string;
23
+ }
24
+ export interface LinkedInfo {
25
+ linkedInfo: LinkedInfoContent;
26
+ }
27
+ export interface TimeInterval {
28
+ year: number;
29
+ month: number;
30
+ day: number;
31
+ hour: number;
32
+ minute: number;
33
+ second: number;
34
+ isRegularInterval: boolean;
35
+ }
36
+ export interface Dimension {
37
+ name?: string;
38
+ units?: string;
39
+ currentValue: string;
40
+ maxValue?: string;
41
+ minValue?: string;
42
+ timeInterval?: TimeInterval;
43
+ synced?: boolean;
44
+ values?: string;
45
+ unitSymbol?: string;
46
+ validSyncSelection?: boolean;
47
+ }
48
+ export interface Style {
49
+ title: string;
50
+ name: string;
51
+ legendURL: string;
52
+ abstract: string;
53
+ }
54
+ export interface GeographicBoundingBox {
55
+ west: string;
56
+ east: string;
57
+ north: string;
58
+ south: string;
59
+ }
60
+ export interface WMLayerType {
61
+ setDimension: (name: string, value: string, updateMapDimensions: boolean) => void;
62
+ getDimension: (name: string) => WMJSDimension;
63
+ dimensions?: WMJSDimension[];
64
+ title?: string;
65
+ headers?: Headers[];
66
+ }
67
+ export interface CoordinateReferenceSystem {
68
+ name?: string;
69
+ bbox?: Bbox;
70
+ }
71
+ export interface LayerProps {
72
+ name: string | null;
73
+ leaf: boolean;
74
+ path: string[];
75
+ title: string;
76
+ abstract?: string;
77
+ keywords?: string[];
78
+ styles?: Style[];
79
+ dimensions?: Dimension[];
80
+ geographicBoundingBox?: GeographicBoundingBox | undefined;
81
+ queryable?: boolean;
82
+ crs?: CoordinateReferenceSystem[];
83
+ }
84
+ /**
85
+ * Represents the layers as advertised in the WMS GetCapabilities document
86
+ */
87
+ export interface LayerTree extends LayerProps {
88
+ children: LayerTree[];
89
+ }
90
+ export interface WMSBoundingBox {
91
+ attr: {
92
+ SRS?: string;
93
+ CRS?: string;
94
+ maxy: string;
95
+ miny: string;
96
+ maxx: string;
97
+ minx: string;
98
+ };
99
+ }
100
+ /**
101
+ * This interface is for reading from the WMS GetCapabilities document, which can have different structures for V1.1.1 and V1.3.0
102
+ */
103
+ export interface WMSLayerFromGetCapabilities {
104
+ attr: {
105
+ queryable: string;
106
+ opaque: string;
107
+ cascaded: string;
108
+ };
109
+ Name: {
110
+ attr: Record<string, unknown>;
111
+ value: string;
112
+ };
113
+ Title: {
114
+ attr: Record<string, unknown>;
115
+ value: string;
116
+ };
117
+ Dimension: unknown;
118
+ Style: unknown;
119
+ Extent: unknown;
120
+ ScaleHint: unknown;
121
+ Abstract: {
122
+ value: string;
123
+ };
124
+ KeywordList: {
125
+ Keyword: unknown;
126
+ };
127
+ Layer: WMSLayerFromGetCapabilities | WMSLayerFromGetCapabilities[];
128
+ EX_GeographicBoundingBox?: {
129
+ northBoundLatitude: {
130
+ attr: Record<string, unknown>;
131
+ value: string;
132
+ };
133
+ southBoundLatitude: {
134
+ attr: Record<string, unknown>;
135
+ value: string;
136
+ };
137
+ westBoundLongitude: {
138
+ attr: Record<string, unknown>;
139
+ value: string;
140
+ };
141
+ eastBoundLongitude: {
142
+ attr: Record<string, unknown>;
143
+ value: string;
144
+ };
145
+ };
146
+ LatLonBoundingBox?: {
147
+ attr: {
148
+ maxy: string;
149
+ miny: string;
150
+ maxx: string;
151
+ minx: string;
152
+ };
153
+ };
154
+ BoundingBox?: WMSBoundingBox[];
155
+ SRS?: {
156
+ value: string;
157
+ }[];
158
+ }
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
+ }
@@ -1,5 +1,5 @@
1
- import webmapTranslations from '../../locales/webmap.json';
2
- export * from './components';
3
- export * from './utils';
4
- export { webmapTranslations };
5
- export { WEBMAP_NAMESPACE } from './utils/i18n';
1
+ import webmapTranslations from '../../locales/webmap.json';
2
+ export * from './components';
3
+ export * from './utils';
4
+ export { webmapTranslations };
5
+ export { WEBMAP_NAMESPACE } from './utils/i18n';