@opengeoweb/webmap 9.35.1-spike-oltanstack.0 → 9.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +7751 -8863
- package/package.json +1 -2
- package/src/index.d.ts +0 -13
- package/src/lib/components/WMGetServiceFromStore.d.ts +3 -0
- package/src/lib/components/WMGlobals.d.ts +8 -0
- package/src/lib/components/WMJSService.d.ts +69 -0
- package/src/lib/components/WMJSTools.d.ts +15 -1
- package/src/lib/components/WMLayer.d.ts +78 -6
- package/src/lib/components/index.d.ts +5 -8
- package/src/lib/components/types.d.ts +1 -26
- package/src/lib/utils/getCapabilities/getCapabilities.d.ts +18 -0
- package/src/lib/utils/getCapabilities/getCapabilities.spec.d.ts +1 -0
- package/src/lib/utils/getCapabilities/index.d.ts +2 -4
- package/src/lib/{specs → utils/getCapabilities/mocks}/index.d.ts +4 -6
- package/src/lib/{specs → utils/getCapabilities/mocks}/mockGetCapabilities.d.ts +1 -2
- package/src/lib/utils/index.d.ts +6 -0
- package/src/lib/utils/mapConstants.d.ts +7 -0
- package/src/lib/utils/specs/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +2 -0
- package/src/lib/{specs/layerSpecs.d.ts → utils/testSettings.d.ts} +5 -24
- package/src/lib/utils/testUtils.d.ts +21 -0
- package/src/lib/utils/utils.d.ts +5 -0
- package/src/lib/components/WMLayerTypes.d.ts +0 -57
- package/src/lib/components/WMLayerUtils.d.ts +0 -22
- package/src/lib/query/queryWMS.d.ts +0 -51
- package/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesRadarTestWithInheritLayerpropsToLayerTree.d.ts +0 -71
- package/src/lib/specs/getCapabilitySpecs/radarGetCapabilities.d.ts +0 -244
- package/src/lib/utils/getCapabilities/getWMSServiceId.d.ts +0 -10
- package/src/lib/utils/getCapabilities/utils.d.ts +0 -38
- package/src/lib/utils/getCapabilities/wmsQueryClient.d.ts +0 -7
- /package/src/lib/{utils/getCapabilities/utils.spec.d.ts → components/WMJSService.spec.d.ts} +0 -0
- /package/src/lib/{specs/getCapabilitySpecs → utils/getCapabilities/mocks}/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +0 -0
- /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesHarmN25.d.ts +0 -0
- /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops.d.ts +0 -0
- /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesRadarTestWithInheritLayerprops.d.ts +0 -0
- /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops.d.ts +0 -0
- /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMSSmartMet.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.36.0",
|
|
4
4
|
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@opengeoweb/shared": "*",
|
|
12
|
-
"@tanstack/query-core": "^5.61.5",
|
|
13
12
|
"proj4": "^2.9.2",
|
|
14
13
|
"lodash": "^4.17.21",
|
|
15
14
|
"i18next": "^23.11.5"
|
package/src/index.d.ts
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
import WMImageStore from './lib/components/WMImageStore';
|
|
2
|
-
import { mockGetCapabilities } from './lib/specs';
|
|
3
1
|
export * from './lib';
|
|
4
|
-
export * as webmapUtils from './lib/utils/utils';
|
|
5
|
-
export * as webmapTestSettings from './lib/specs';
|
|
6
|
-
export { mockGetCapabilities };
|
|
7
|
-
declare const privateWebMapUtils: {
|
|
8
|
-
privateWmsGetCapabilities: (serviceUrl: string, headers?: import("./lib").Header[], forceReload?: boolean) => Promise<import("./lib").GetCapabilitiesJson>;
|
|
9
|
-
privateGetWMSServiceInfo: (getCapabilitiesJson: import("./lib").GetCapabilitiesJson, serviceUrl: string) => import("./lib").WMSServiceInfo;
|
|
10
|
-
privateWmsGetLayerTree: (jsonData: import("./lib").GetCapabilitiesJson) => import("./lib").LayerTree;
|
|
11
|
-
privateWmsFlattenLayerTree: (layerTree: import("./lib").LayerTree) => import("./lib").LayerProps[];
|
|
12
|
-
};
|
|
13
|
-
export { privateWebMapUtils };
|
|
14
|
-
export { WMImageStore };
|
|
@@ -0,0 +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,4 +1,4 @@
|
|
|
1
|
-
import type { Dimension, GeographicBoundingBox, LayerProps, Style, WMSLayerFromGetCapabilities } from './types';
|
|
1
|
+
import type { Dimension, GeographicBoundingBox, LayerProps, LayerTree, Style, WMSLayerFromGetCapabilities } from './types';
|
|
2
2
|
import type WMLayer from './WMLayer';
|
|
3
3
|
export declare const enableConsoleDebugging = false;
|
|
4
4
|
export declare enum DebugType {
|
|
@@ -75,6 +75,12 @@ export declare const addBoundingBoxForLayer: (layerObjectFromWMS: WMSLayerFromGe
|
|
|
75
75
|
* @returns Sorted array.
|
|
76
76
|
*/
|
|
77
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[];
|
|
78
84
|
/**
|
|
79
85
|
* Makes a LayerProps object from the WMSLayerFromGetCapabilities and nestedLayerPath
|
|
80
86
|
* @param layer WMSLayerFromGetCapabilities
|
|
@@ -84,3 +90,11 @@ export declare function sortArrayOfObjectsByKey<ArrayOfObjects>(array: ArrayOfOb
|
|
|
84
90
|
* @returns
|
|
85
91
|
*/
|
|
86
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,9 +1,74 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import { FeatureCollection } from 'geojson';
|
|
2
3
|
import type IWMJSMap from './IWMJSMap';
|
|
3
4
|
import WMJSDimension from './WMJSDimension';
|
|
4
5
|
import WMProjection from './WMProjection';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
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;
|
|
7
72
|
export default class WMLayer {
|
|
8
73
|
id: string;
|
|
9
74
|
name?: string;
|
|
@@ -60,7 +125,7 @@ export default class WMLayer {
|
|
|
60
125
|
constructor(options?: LayerOptions);
|
|
61
126
|
getLayerName(): string;
|
|
62
127
|
toggleAutoUpdate(): void;
|
|
63
|
-
setAutoUpdate(val: boolean, interval?: number): void;
|
|
128
|
+
setAutoUpdate(val: boolean, interval?: number, callback?: () => void): void;
|
|
64
129
|
setOpacity(opacityValue: number): void;
|
|
65
130
|
getOpacity(): number;
|
|
66
131
|
remove(): void;
|
|
@@ -69,12 +134,19 @@ export default class WMLayer {
|
|
|
69
134
|
handleReferenceTime(name: string, value: string, updateMapDimensions?: boolean): void;
|
|
70
135
|
getDimensions(): WMJSDimension[];
|
|
71
136
|
setDimension(name: string, value: string, updateMapDimensions?: boolean): void;
|
|
72
|
-
|
|
73
|
-
/**
|
|
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
|
|
74
146
|
* @param forceReload Do not use the cache of the WMS GetCapabilities document, but instead fetch new data from the server
|
|
75
147
|
* @returns WMLayer object
|
|
76
148
|
*/
|
|
77
|
-
|
|
149
|
+
parseLayerPromise(forceReload?: boolean): Promise<WMLayer>;
|
|
78
150
|
cloneLayer(): WMLayer;
|
|
79
151
|
/**
|
|
80
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
|
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import type IWMJSMap from './IWMJSMap';
|
|
2
2
|
import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType, getUriWithParam } from './WMJSTools';
|
|
3
|
+
import WMGetServiceFromStore from './WMGetServiceFromStore';
|
|
3
4
|
import { parseISO8601DateToDate, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration } from './WMTime';
|
|
4
5
|
import WMImage from './WMImage';
|
|
5
6
|
import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
|
|
6
7
|
import { WMImageEventType } from './WMImageStore';
|
|
8
|
+
import { WMJSService, wmServiceListener } from './WMJSService';
|
|
7
9
|
import WMListener from './WMListener';
|
|
8
10
|
import WMJSMap from './WMJSMap';
|
|
9
11
|
import WMProjection from './WMProjection';
|
|
10
|
-
import { LayerType } from './WMLayerTypes';
|
|
11
|
-
import { WMXMLStringToJson } from './WMXMLParser';
|
|
12
12
|
export { default as WMJSDimension, handleDateUtilsISOString, } from './WMJSDimension';
|
|
13
|
-
export { default as WMLayer } from './WMLayer';
|
|
14
|
-
export type { LayerOptions, LayerFoundation } from './
|
|
15
|
-
export { LayerType };
|
|
13
|
+
export { default as WMLayer, LayerType } from './WMLayer';
|
|
14
|
+
export type { LayerOptions, LayerFoundation } from './WMLayer';
|
|
16
15
|
export { default as WMBBOX } from './WMBBOX';
|
|
17
16
|
export type { Bbox } from './WMBBOX';
|
|
18
17
|
export type { WMProjectionWH } from './WMProjection';
|
|
19
18
|
export { WMProjection };
|
|
20
|
-
export { IWMJSMap, WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, getUriWithParam,
|
|
19
|
+
export { IWMJSMap, WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMGetServiceFromStore, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, WMJSService, getUriWithParam, wmServiceListener, WMListener, };
|
|
21
20
|
export * from './types';
|
|
22
21
|
export * from './WMTimeTypes';
|
|
23
22
|
export * from './WMConstants';
|
|
24
23
|
export * from './WMJSMapHelpers';
|
|
25
24
|
export * from './WMCanvasDrawFunctions';
|
|
26
|
-
declare const wmServiceListener: WMListener;
|
|
27
|
-
export { wmServiceListener };
|
|
@@ -72,7 +72,7 @@ export interface LayerProps {
|
|
|
72
72
|
name: string | null;
|
|
73
73
|
leaf: boolean;
|
|
74
74
|
path: string[];
|
|
75
|
-
title
|
|
75
|
+
title: string;
|
|
76
76
|
abstract?: string;
|
|
77
77
|
keywords?: string[];
|
|
78
78
|
styles?: Style[];
|
|
@@ -172,28 +172,3 @@ export interface IWMProj4 {
|
|
|
172
172
|
crs: string;
|
|
173
173
|
proj4: typeof proj4;
|
|
174
174
|
}
|
|
175
|
-
export interface GetCapabilitiesJson {
|
|
176
|
-
WMS_Capabilities?: any;
|
|
177
|
-
WMT_MS_Capabilities?: any;
|
|
178
|
-
ServiceExceptionReport?: any;
|
|
179
|
-
}
|
|
180
|
-
export interface WMSServiceInfo {
|
|
181
|
-
id?: string;
|
|
182
|
-
version: string;
|
|
183
|
-
abstract: string;
|
|
184
|
-
title: string;
|
|
185
|
-
onlineresource: string;
|
|
186
|
-
getmapURL: string;
|
|
187
|
-
getCapabilitiesJson: GetCapabilitiesJson;
|
|
188
|
-
}
|
|
189
|
-
export interface Capability {
|
|
190
|
-
Layer: WMSLayerFromGetCapabilities;
|
|
191
|
-
Request: any;
|
|
192
|
-
}
|
|
193
|
-
export interface XLINK {
|
|
194
|
-
'xlink:href': string;
|
|
195
|
-
}
|
|
196
|
-
export interface Header {
|
|
197
|
-
name: string;
|
|
198
|
-
value: string;
|
|
199
|
-
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LayerTree } from '../../components';
|
|
2
|
+
/**
|
|
3
|
+
* Converts webmapjs node structure to LayerTree
|
|
4
|
+
* @param nodesToRecur THe WebMapJS node structure from service.getNodes();
|
|
5
|
+
*/
|
|
6
|
+
export declare const recurseNodes: (nodesToRecur: LayerTree) => LayerTree;
|
|
7
|
+
/**
|
|
8
|
+
* Returns a promise with a hierarchical tree of layers from the WMS GetCapabilities document.
|
|
9
|
+
* @param serviceUrl The URL of the WMS service
|
|
10
|
+
* @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
|
|
11
|
+
*/
|
|
12
|
+
export declare const getLayersFromService: (serviceUrl: string, forceReload?: boolean) => Promise<LayerTree>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a promise with an array of flattened layerobjects from the WMS GetCapabilities document.
|
|
15
|
+
* @param serviceUrl The URL of the WMS service
|
|
16
|
+
* @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
|
|
17
|
+
*/
|
|
18
|
+
export declare const getLayersFlattenedFromService: (serviceUrl: string, forceReload?: boolean) => Promise<[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export { setWMSGetCapabilitiesFetcher } from './utils';
|
|
4
|
-
export { getWMSServiceId } from './getWMSServiceId';
|
|
1
|
+
export * from './mocks';
|
|
2
|
+
export * as getCapabilities from './getCapabilities';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './layerSpecs';
|
|
2
1
|
export declare const mockGetCapabilities: {
|
|
3
2
|
WMS111GetCapabilitiesGeoServicesRADAR: string;
|
|
4
3
|
MOCK_URL_WITH_CHILDREN: "https://mockUrlWithChildren.nl";
|
|
@@ -32,8 +31,8 @@ export declare const mockGetCapabilities: {
|
|
|
32
31
|
children: never[];
|
|
33
32
|
}[];
|
|
34
33
|
};
|
|
35
|
-
mockLayersWithNoTitle: import("
|
|
36
|
-
mockLayersWithNoTitleOrName: import("
|
|
34
|
+
mockLayersWithNoTitle: import("../../..").LayerTree;
|
|
35
|
+
mockLayersWithNoTitleOrName: import("../../..").LayerTree;
|
|
37
36
|
mockLayersWithSubcategory: {
|
|
38
37
|
leaf: boolean;
|
|
39
38
|
name: null;
|
|
@@ -85,7 +84,6 @@ export declare const mockGetCapabilities: {
|
|
|
85
84
|
path: never[];
|
|
86
85
|
children: never[];
|
|
87
86
|
};
|
|
88
|
-
mockGetLayersFromService: (url: string) => Promise<import("
|
|
89
|
-
mockGetLayersFlattenedFromService: (url: string) => Promise<import("
|
|
90
|
-
mockGetCapabilitiesFetcher: (serviceUrl: string) => Promise<import("..").GetCapabilitiesJson>;
|
|
87
|
+
mockGetLayersFromService: (url: string) => Promise<import("../../..").LayerTree>;
|
|
88
|
+
mockGetLayersFlattenedFromService: (url: string) => Promise<import("../../..").LayerProps[]>;
|
|
91
89
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LayerProps, LayerTree } from '../../../components';
|
|
2
2
|
export declare const MOCK_URL_WITH_CHILDREN = "https://mockUrlWithChildren.nl";
|
|
3
3
|
export declare const MOCK_URL_NO_CHILDREN = "https://mockUrlNoChildren.nl";
|
|
4
4
|
export declare const MOCK_URL_WITH_NO_TITLE = "https://mockUrlWithNoTitle.nl";
|
|
@@ -85,4 +85,3 @@ export declare const mockLayersDefault2: {
|
|
|
85
85
|
};
|
|
86
86
|
export declare const mockGetLayersFromService: (url: string) => Promise<LayerTree>;
|
|
87
87
|
export declare const mockGetLayersFlattenedFromService: (url: string) => Promise<LayerProps[]>;
|
|
88
|
-
export declare const mockGetCapabilitiesFetcher: (serviceUrl: string) => Promise<GetCapabilitiesJson>;
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export * as webmapTestSettings from './testSettings';
|
|
1
2
|
export * from './tilesettings';
|
|
3
|
+
export * as webmapUtils from './utils';
|
|
2
4
|
export * from './utils';
|
|
5
|
+
export * from './testUtils';
|
|
3
6
|
export * from './getCapabilities';
|
|
7
|
+
export type { SpeedFactorType } from './mapConstants';
|
|
8
|
+
export * as mapConstants from './mapConstants';
|
|
9
|
+
export { speedFactors } from './mapConstants';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const defaultAnimationDelayAtStart = 250;
|
|
2
|
+
export declare const defaultDelay = 1000;
|
|
3
|
+
export declare const defaultTimeStep = 60;
|
|
4
|
+
export declare const defaultSecondsPerPx = 80;
|
|
5
|
+
export declare const defaultTimeSpan: number;
|
|
6
|
+
export type SpeedFactorType = 0.1 | 0.2 | 0.5 | 1 | 2 | 4 | 8 | 16;
|
|
7
|
+
export declare const speedFactors: SpeedFactorType[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE WMT_MS_Capabilities SYSTEM \"http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd\" [\n <!ELEMENT VendorSpecificCapabilities EMPTY>\n]>\n<!-- end of DOCTYPE declaration -->\n<WMT_MS_Capabilities version=\"1.1.1\">\n <Service>\n <Name>OGC:WMS</Name>\n <Title>RADAR</Title>\n <Abstract>This service demonstrates how the ADAGUC server can be used to create OGC services.</Abstract>\n <ServerInfo>ADAGUCServer version 2.5.8, of Apr 13 2021 07:55:43</ServerInfo>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n <ContactInformation />\n </Service>\n <Capability>\n <Request>\n <GetCapabilities>\n <Format>application/vnd.ogc.wms_xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetCapabilities>\n <GetMap>\n <Format>image/png</Format>\n <Format>image/gif</Format>\n <Format>image/png32</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetMap>\n <GetFeatureInfo>\n <Format>text/plain</Format>\n <Format>text/html</Format>\n <Format>text/xml</Format>\n <Format>application/vnd.ogc.gml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetFeatureInfo>\n <DescribeLayer>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </DescribeLayer>\n <GetLegendGraphic>\n <Format>image/png</Format>\n <Format>image/gif</Format>\n <Format>image/png32</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetLegendGraphic>\n <GetStyles>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetStyles>\n </Request>\n <Exception>\n <Format>application/vnd.ogc.se_xml</Format>\n <Format>application/vnd.ogc.se_inimage</Format>\n <Format>application/vnd.ogc.se_blank</Format>\n </Exception>\n <VendorSpecificCapabilities />\n <UserDefinedSymbolization SupportSLD=\"1\" UserLayer=\"0\" UserStyle=\"1\" RemoteWFS=\"0\" />\n <Layer>\n <Title>WMS of RADAR</Title>\n <SRS>EPSG:3411</SRS>\n <SRS>EPSG:3412</SRS>\n <SRS>EPSG:3575</SRS>\n <SRS>EPSG:3857</SRS>\n <SRS>EPSG:4258</SRS>\n <SRS>EPSG:4326</SRS>\n <SRS>CRS:84</SRS>\n <SRS>EPSG:25831</SRS>\n <SRS>EPSG:25832</SRS>\n <SRS>EPSG:28992</SRS>\n <SRS>EPSG:7399</SRS>\n <SRS>EPSG:50001</SRS>\n <SRS>EPSG:54030</SRS>\n <SRS>EPSG:32661</SRS>\n <SRS>EPSG:40000</SRS>\n <SRS>EPSG:900913</SRS>\n <SRS>PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0</SRS>\n <Layer queryable=\"1\" opaque=\"1\" cascaded=\"0\">\n <Name>RAD_NL25_PCP_CM</Name>\n <Title>Precipitation Radar NL</Title>\n <SRS>EPSG:3411</SRS>\n <BoundingBox SRS=\"EPSG:3411\" minx=\"2682754.743620\" miny=\"-3245034.014141\" maxx=\"3759536.917562\" maxy=\"-2168251.989038\" />\n <SRS>EPSG:3412</SRS>\n <BoundingBox SRS=\"EPSG:3412\" minx=\"0.000000\" miny=\"32318824.826266\" maxx=\"7413041.166015\" maxy=\"40075258.815074\" />\n <SRS>EPSG:3575</SRS>\n <BoundingBox SRS=\"EPSG:3575\" minx=\"-770622.801471\" miny=\"-4485814.811314\" maxx=\"56845.766135\" maxy=\"-3684039.443620\" />\n <SRS>EPSG:3857</SRS>\n <BoundingBox SRS=\"EPSG:3857\" minx=\"0.000000\" miny=\"6257115.219364\" maxx=\"1208534.698398\" maxy=\"7553161.958695\" />\n <SRS>EPSG:4258</SRS>\n <BoundingBox SRS=\"EPSG:4258\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>EPSG:4326</SRS>\n <BoundingBox SRS=\"EPSG:4326\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>CRS:84</SRS>\n <BoundingBox SRS=\"CRS:84\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>EPSG:25831</SRS>\n <BoundingBox SRS=\"EPSG:25831\" minx=\"282182.345905\" miny=\"5433247.394267\" maxx=\"997135.658653\" maxy=\"6207204.592736\" />\n <SRS>EPSG:25832</SRS>\n <BoundingBox SRS=\"EPSG:25832\" minx=\"-153083.019482\" miny=\"5415817.312927\" maxx=\"617595.626092\" maxy=\"6239769.309937\" />\n <SRS>EPSG:28992</SRS>\n <BoundingBox SRS=\"EPSG:28992\" minx=\"-236275.338083\" miny=\"106727.731651\" maxx=\"501527.918656\" maxy=\"900797.079725\" />\n <SRS>EPSG:7399</SRS>\n <BoundingBox SRS=\"EPSG:7399\" minx=\"0.000000\" miny=\"5757301.056717\" maxx=\"763611.971696\" maxy=\"6483919.801602\" />\n <SRS>EPSG:50001</SRS>\n <BoundingBox SRS=\"EPSG:50001\" minx=\"-2000000.000000\" miny=\"-2000000.000000\" maxx=\"10000000.000000\" maxy=\"8500000.000000\" />\n <SRS>EPSG:54030</SRS>\n <BoundingBox SRS=\"EPSG:54030\" minx=\"0.000000\" miny=\"5211855.054125\" maxx=\"853649.695106\" maxy=\"5936394.291427\" />\n <SRS>EPSG:32661</SRS>\n <BoundingBox SRS=\"EPSG:32661\" minx=\"2000000.000000\" miny=\"-2703305.597319\" maxx=\"2745713.040381\" maxy=\"-1888346.216710\" />\n <SRS>EPSG:40000</SRS>\n <BoundingBox SRS=\"EPSG:40000\" minx=\"0.000000\" miny=\"-4731695.771951\" maxx=\"750214.326339\" maxy=\"-3911817.119426\" />\n <SRS>EPSG:900913</SRS>\n <BoundingBox SRS=\"EPSG:900913\" minx=\"0.000000\" miny=\"6257115.219364\" maxx=\"1208534.698398\" maxy=\"7553161.958695\" />\n <SRS>PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0</SRS>\n <BoundingBox SRS=\"PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0\" minx=\"0.000000\" miny=\"-3649.999338\" maxx=\"700.002420\" maxy=\"-4415.002986\" />\n <LatLonBoundingBox minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <Dimension name=\"time\" units=\"ISO8601\" />\n <Extent name=\"time\" default=\"2021-05-17T00:00:00Z\" multipleValues=\"1\" nearestValue=\"0\">2021-03-31T09:25:00Z/2021-05-18T07:45:00Z/PT5M</Extent>\n <Style>\n <Name>radar/nearest</Name>\n <Title>radar/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=radar/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-rainbow/nearest</Name>\n <Title>precip-rainbow/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-rainbow/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-gray/nearest</Name>\n <Title>precip-gray/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-gray/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-blue/nearest</Name>\n <Title>precip-blue/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-blue/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-blue-transparent/nearest</Name>\n <Title>precip-blue-transparent/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-blue-transparent/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-with-range/nearest</Name>\n <Title>precip-with-range/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-with-range/nearest\" />\n </LegendURL>\n </Style>\n <ScaleHint min=\"0\" max=\"10000\" />\n </Layer>\n </Layer>\n </Capability>\n</WMT_MS_Capabilities>";
|
|
2
|
+
export default _default;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { CoordinateReferenceSystem, Dimension, LayerFoundation, LayerOptions,
|
|
1
|
+
import { CoordinateReferenceSystem, Dimension, LayerFoundation, LayerOptions, Style, WMLayer } from '../components';
|
|
2
2
|
export declare const defaultReduxLayerRadarColor: LayerOptions;
|
|
3
|
+
export declare const multiDimensionLayer: LayerOptions;
|
|
3
4
|
export declare const WmdefaultReduxLayerRadarKNMI: WMLayer;
|
|
5
|
+
export declare const defaultReduxLayerRadarKNMI: LayerFoundation & {
|
|
6
|
+
styles: Style[];
|
|
7
|
+
};
|
|
4
8
|
export declare const makeGeoservicesRadarLayer: (dimensions?: Dimension[]) => WMLayer;
|
|
5
9
|
export declare const WmMultiDimensionLayer: WMLayer;
|
|
6
10
|
export declare const layerWithoutTimeDimension: LayerOptions;
|
|
@@ -8,26 +12,3 @@ export declare const WmLayerWithoutTimeDimension: WMLayer;
|
|
|
8
12
|
export declare const crsListForRADNL25PCPCMLayer: CoordinateReferenceSystem[];
|
|
9
13
|
export declare const styleListForRADNL25PCPCMLayer: Style[];
|
|
10
14
|
export declare const multiDimensionLayer3: LayerFoundation;
|
|
11
|
-
export declare const defaultReduxLayerRadarKNMIWithStyles: LayerFoundation & {
|
|
12
|
-
styles: Style[];
|
|
13
|
-
};
|
|
14
|
-
export declare const defaultReduxLayerRadarKNMI: LayerOptions;
|
|
15
|
-
export declare const multiDimensionLayer: {
|
|
16
|
-
service: string;
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
title: string;
|
|
20
|
-
layerType: LayerType;
|
|
21
|
-
enabled: boolean;
|
|
22
|
-
dimensions: ({
|
|
23
|
-
name: string;
|
|
24
|
-
units: string;
|
|
25
|
-
currentValue: string;
|
|
26
|
-
values: string;
|
|
27
|
-
} | {
|
|
28
|
-
name: string;
|
|
29
|
-
units: string;
|
|
30
|
-
currentValue: string;
|
|
31
|
-
values?: undefined;
|
|
32
|
-
})[];
|
|
33
|
-
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LayerOptions, LayerType } from '../components/WMLayer';
|
|
2
|
+
export declare const defaultReduxLayerRadarKNMI: LayerOptions;
|
|
3
|
+
export declare const multiDimensionLayer: {
|
|
4
|
+
service: string;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
title: string;
|
|
8
|
+
layerType: LayerType;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
dimensions: ({
|
|
11
|
+
name: string;
|
|
12
|
+
units: string;
|
|
13
|
+
currentValue: string;
|
|
14
|
+
values: string;
|
|
15
|
+
} | {
|
|
16
|
+
name: string;
|
|
17
|
+
units: string;
|
|
18
|
+
currentValue: string;
|
|
19
|
+
values?: undefined;
|
|
20
|
+
})[];
|
|
21
|
+
};
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WMJSDimension, IWMJSMap, WMLayer } from '../components';
|
|
2
|
+
import { SpeedFactorType } from './mapConstants';
|
|
2
3
|
export declare const generateLayerId: () => string;
|
|
3
4
|
export declare const generateMapId: () => string;
|
|
4
5
|
export declare const generateTimesliderId: () => string;
|
|
@@ -49,3 +50,7 @@ export declare const getWMJSTimeDimensionForLayerId: (layerId: string) => WMJSDi
|
|
|
49
50
|
*/
|
|
50
51
|
export declare const clearImageCacheForAllMaps: () => void;
|
|
51
52
|
export declare const roundWithTimeStep: (unixTime: number, timeStep: number, type?: string) => number;
|
|
53
|
+
/**
|
|
54
|
+
* Returns speed delay for given speedFactor. For options, see defined above in "speedFactors"
|
|
55
|
+
*/
|
|
56
|
+
export declare const getSpeedDelay: (speedFactor: SpeedFactorType) => number;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { FeatureCollection } from 'geojson';
|
|
2
|
-
import type { TileServerSettings } from '../utils';
|
|
3
|
-
import type IWMJSMap from './IWMJSMap';
|
|
4
|
-
import type { Dimension } from './types';
|
|
5
|
-
import type WMLayer from './WMLayer';
|
|
6
|
-
export declare enum LayerType {
|
|
7
|
-
mapLayer = "mapLayer",
|
|
8
|
-
baseLayer = "baseLayer",
|
|
9
|
-
overLayer = "overLayer",
|
|
10
|
-
featureLayer = "featureLayer"
|
|
11
|
-
}
|
|
12
|
-
export interface TiledLayerFoundation {
|
|
13
|
-
tileServer?: TileServerSettings;
|
|
14
|
-
}
|
|
15
|
-
export interface LayerFoundation extends TiledLayerFoundation {
|
|
16
|
-
acceptanceTimeInMinutes?: number;
|
|
17
|
-
dimensions?: Dimension[];
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
format?: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
layerType?: LayerType;
|
|
22
|
-
name?: string;
|
|
23
|
-
opacity?: number;
|
|
24
|
-
service?: string;
|
|
25
|
-
style?: string;
|
|
26
|
-
title?: string;
|
|
27
|
-
type?: string;
|
|
28
|
-
geojson?: FeatureCollection;
|
|
29
|
-
}
|
|
30
|
-
export interface LayerOptions extends LayerFoundation {
|
|
31
|
-
id: string;
|
|
32
|
-
layerType: LayerType;
|
|
33
|
-
service: string;
|
|
34
|
-
getmapURL?: string;
|
|
35
|
-
active?: boolean;
|
|
36
|
-
getgraphinfoURL?: string;
|
|
37
|
-
currentStyle?: string;
|
|
38
|
-
sldURL?: string;
|
|
39
|
-
keepOnTop?: boolean;
|
|
40
|
-
transparent?: boolean;
|
|
41
|
-
onReady?: (param: LayerOptions) => void;
|
|
42
|
-
parentMap?: IWMJSMap;
|
|
43
|
-
headers?: Headers[];
|
|
44
|
-
failure?: (layer: WMLayer, message: string) => void;
|
|
45
|
-
ReactWMJSLayerId?: string;
|
|
46
|
-
onLayerError?: (layer: WMLayer, error: Error, webmapInstance: IWMJSMap) => void;
|
|
47
|
-
onLayerReady?: (layer: WMLayer, webmap?: IWMJSMap) => void;
|
|
48
|
-
geojson?: GeoJSON.FeatureCollection;
|
|
49
|
-
}
|
|
50
|
-
export interface WMSLayerDimInfo {
|
|
51
|
-
name: string;
|
|
52
|
-
units: string;
|
|
53
|
-
unitSymbol: string;
|
|
54
|
-
value: string;
|
|
55
|
-
default: string;
|
|
56
|
-
linkDimensionToMap: boolean;
|
|
57
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { LayerProps } from './types';
|
|
2
|
-
import type WMLayer from './WMLayer';
|
|
3
|
-
/**
|
|
4
|
-
* 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.
|
|
5
|
-
* @param layerObjectFromWMS The corresponding layer object from the WMS GetCapabilities.
|
|
6
|
-
* @param layer THe WMLayer to configure
|
|
7
|
-
* @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.
|
|
8
|
-
*/
|
|
9
|
-
export declare const addDimsForLayer: (layerProps: LayerProps, layer: WMLayer, layerDimNamesToRemove: Set<string>) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Helper function to configure the WMS Styles from the WMS GetCapabilities document.
|
|
12
|
-
* @param nestedLayerPath Array of WMS Layers from `[Root WMS Layer] => [Parent(s) WMS Layer] => [This WMS layer]`.
|
|
13
|
-
* @param wmLayer The WMLayer object to configure
|
|
14
|
-
*/
|
|
15
|
-
export declare const configureStyles: (layerProps: LayerProps, wmLayer: WMLayer) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Helper function to configure the dimensions for this layer from the WMS GetCapabilities document.
|
|
18
|
-
* @param nestedLayerPath Array of WMS Layers from `[Root WMS Layer] => [Parent(s) WMS Layer] => [This WMS layer]`.
|
|
19
|
-
* @param wmLayer The WMLayer object to configure
|
|
20
|
-
*/
|
|
21
|
-
export declare const configureDimensions: (layerProps: LayerProps, wmLayer: WMLayer) => void;
|
|
22
|
-
export declare const configureGeographicBoundingBox: (layerProps: LayerProps, wmLayer: WMLayer) => void;
|