@opengeoweb/webmap 19.1.0 → 19.2.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/dist/README.md +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +6984 -0
- package/dist/src/index.d.ts +16 -0
- package/dist/src/lib/components/LoadDurationCounter.d.ts +17 -0
- package/dist/src/lib/components/WMBBOX.d.ts +32 -0
- package/dist/src/lib/components/WMConstants.d.ts +32 -0
- package/dist/src/lib/components/WMImage.d.ts +115 -0
- package/dist/src/lib/components/WMImageStore.d.ts +61 -0
- package/dist/src/lib/components/WMJSDimension.d.ts +126 -0
- package/dist/src/lib/components/WMJSDimensionModes.d.ts +15 -0
- package/dist/src/lib/components/WMJSTools.d.ts +62 -0
- package/dist/src/lib/components/WMLayer.d.ts +117 -0
- package/dist/src/lib/components/WMLayerTypes.d.ts +66 -0
- package/dist/src/lib/components/WMLayerUtils.d.ts +22 -0
- package/dist/src/lib/components/WMLegend.d.ts +6 -0
- package/dist/src/lib/components/WMListener.d.ts +57 -0
- package/dist/src/lib/components/WMProjection.d.ts +17 -0
- package/dist/src/lib/components/WMTime.d.ts +44 -0
- package/dist/src/lib/components/WMTimeTypes.d.ts +19 -0
- package/dist/src/lib/components/WMXMLParser.d.ts +9 -0
- package/dist/src/lib/components/index.d.ts +25 -0
- package/dist/src/lib/components/makeHashUrlForGeoReferencedImage.d.ts +6 -0
- package/dist/src/lib/components/types.d.ts +231 -0
- package/dist/src/lib/index.d.ts +5 -0
- package/dist/src/lib/query/fakeApiWmtsQueries.d.ts +208 -0
- package/dist/src/lib/query/queryConstants.d.ts +7 -0
- package/dist/src/lib/query/queryWMS.d.ts +69 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +1 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesHarmN25.d.ts +2 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops.d.ts +2 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesRadarTestWithInheritLayerprops.d.ts +2 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesRadarTestWithInheritLayerpropsToLayerTree.d.ts +76 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops.d.ts +2 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMSGetCapabilitiesMissingLegend.d.ts +1 -0
- package/dist/src/lib/specs/getCapabilitySpecs/WMSSmartMet.d.ts +2 -0
- package/dist/src/lib/specs/getCapabilitySpecs/radarGetCapabilities.d.ts +244 -0
- package/dist/src/lib/specs/index.d.ts +93 -0
- package/dist/src/lib/specs/layerSpecs.d.ts +34 -0
- package/dist/src/lib/specs/mockGetCapabilities.d.ts +90 -0
- package/dist/src/lib/utils/consoleErrorMessages.d.ts +12 -0
- package/dist/src/lib/utils/fakeMaxAgeResponses.d.ts +1 -0
- package/dist/src/lib/utils/getCapabilities/getWMSServiceId.d.ts +10 -0
- package/dist/src/lib/utils/getCapabilities/index.d.ts +4 -0
- package/dist/src/lib/utils/getCapabilities/utils.d.ts +64 -0
- package/dist/src/lib/utils/getCapabilities/wmsQueryClient.d.ts +7 -0
- package/dist/src/lib/utils/i18n.d.ts +6 -0
- package/dist/src/lib/utils/index.d.ts +3 -0
- package/dist/src/lib/utils/tilesettings.d.ts +27 -0
- package/dist/src/lib/utils/utils.d.ts +31 -0
- package/package.json +2 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { WMSGetCapabilities, LayerProps, LayerTree } from '../components';
|
|
2
|
+
export declare const MOCK_URL_WITH_CHILDREN = "https://mockUrlWithChildren.nl";
|
|
3
|
+
export declare const MOCK_URL_NO_CHILDREN = "https://mockUrlNoChildren.nl";
|
|
4
|
+
export declare const MOCK_URL_WITH_NO_TITLE = "https://mockUrlWithNoTitle.nl";
|
|
5
|
+
export declare const MOCK_URL_WITH_NO_TITLE_OR_NAME = "https://mockUrlWithNoTitleOrName.nl/wms?";
|
|
6
|
+
export declare const MOCK_URL_WITH_SUBCATEGORY = "https://mockUrlWithSubcategory.nl";
|
|
7
|
+
export declare const MOCK_URL_INVALID = "https://notawmsservice.nl";
|
|
8
|
+
export declare const MOCK_URL_SLOW = "https://slowresolve.nl";
|
|
9
|
+
export declare const MOCK_URL_SLOW_FAILS = "https://slowreject.nl";
|
|
10
|
+
export declare const MOCK_URL_DEFAULT = "https://defaultservice.nl";
|
|
11
|
+
export declare const MOCK_URL_DEFAULT2 = "https://defaultservice2.nl";
|
|
12
|
+
export declare const MOCK_URL_HTTP = "http://wmsservice.nl";
|
|
13
|
+
export declare const MOCK_URL_HARMONIE = "WMS130GetCapabilitiesHarmN25";
|
|
14
|
+
export declare const MOCK_URL_WMS130_NOLEGEND = "MOCK_URL_WMS130_NOLEGEND";
|
|
15
|
+
export declare const mockLayersNoChildren: {
|
|
16
|
+
leaf: boolean;
|
|
17
|
+
name: null;
|
|
18
|
+
title: string;
|
|
19
|
+
path: never[];
|
|
20
|
+
children: never[];
|
|
21
|
+
};
|
|
22
|
+
export declare const mockLayersWithChildren: {
|
|
23
|
+
leaf: boolean;
|
|
24
|
+
name: null;
|
|
25
|
+
title: string;
|
|
26
|
+
path: never[];
|
|
27
|
+
children: {
|
|
28
|
+
leaf: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
title: string;
|
|
31
|
+
path: never[];
|
|
32
|
+
children: never[];
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
export declare const mockLayersWithNoTitle: LayerTree;
|
|
36
|
+
export declare const mockLayersWithNoTitleOrName: LayerTree;
|
|
37
|
+
export declare const mockLayersWithSubcategory: {
|
|
38
|
+
leaf: boolean;
|
|
39
|
+
name: null;
|
|
40
|
+
title: string;
|
|
41
|
+
path: never[];
|
|
42
|
+
children: ({
|
|
43
|
+
leaf: boolean;
|
|
44
|
+
name: string;
|
|
45
|
+
title: string;
|
|
46
|
+
path: never[];
|
|
47
|
+
children: never[];
|
|
48
|
+
} | {
|
|
49
|
+
leaf: boolean;
|
|
50
|
+
name: null;
|
|
51
|
+
title: string;
|
|
52
|
+
path: never[];
|
|
53
|
+
children: ({
|
|
54
|
+
leaf: boolean;
|
|
55
|
+
name: string;
|
|
56
|
+
title: string;
|
|
57
|
+
path: string[];
|
|
58
|
+
children: never[];
|
|
59
|
+
} | {
|
|
60
|
+
leaf: boolean;
|
|
61
|
+
name: null;
|
|
62
|
+
title: string;
|
|
63
|
+
path: string[];
|
|
64
|
+
children: {
|
|
65
|
+
leaf: boolean;
|
|
66
|
+
name: string;
|
|
67
|
+
title: string;
|
|
68
|
+
path: string[];
|
|
69
|
+
children: never[];
|
|
70
|
+
}[];
|
|
71
|
+
})[];
|
|
72
|
+
})[];
|
|
73
|
+
};
|
|
74
|
+
export declare const mockLayersDefault: {
|
|
75
|
+
leaf: boolean;
|
|
76
|
+
name: null;
|
|
77
|
+
title: string;
|
|
78
|
+
path: never[];
|
|
79
|
+
children: never[];
|
|
80
|
+
};
|
|
81
|
+
export declare const mockLayersDefault2: {
|
|
82
|
+
leaf: boolean;
|
|
83
|
+
name: null;
|
|
84
|
+
title: string;
|
|
85
|
+
path: never[];
|
|
86
|
+
children: never[];
|
|
87
|
+
};
|
|
88
|
+
export declare const mockGetLayersFromService: (url: string) => Promise<LayerTree>;
|
|
89
|
+
export declare const mockGetLayersFlattenedFromService: (url: string) => Promise<LayerProps[]>;
|
|
90
|
+
export declare const mockGetCapabilitiesFetcher: (serviceUrl: string) => Promise<WMSGetCapabilities>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const consoleErrorMessages: {
|
|
2
|
+
noCapabilityElementFound: string;
|
|
3
|
+
noServiceDefined: string;
|
|
4
|
+
noWmsCapabilityElementFound: string;
|
|
5
|
+
noWmsLayerElementFound: string;
|
|
6
|
+
notAvailableMessage: string;
|
|
7
|
+
serviceHasError: string;
|
|
8
|
+
serviceUrlEmpty: string;
|
|
9
|
+
unableToConnectServer: string;
|
|
10
|
+
wmsServiceExceptionCode: string;
|
|
11
|
+
layerNotFoundInService: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fakeMaxAgeResponsesByLayer: Record<string, number>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const _generateServiceId: () => string;
|
|
2
|
+
export declare const _serviceIdLookupMap: Map<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the id corresponding to a WMS service url. It ensures that the id is unique across services.
|
|
5
|
+
* The id can be used as a key in the redux store.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} serviceUrl Link to a WMS service
|
|
8
|
+
* @returns {string} Returns the corresponding id
|
|
9
|
+
*/
|
|
10
|
+
export declare const getWMSServiceId: (serviceUrl: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { invalidateWMSGetCapabilities, queryWMSGetCapabilities, queryWMSLayersTree, queryWMSLayers, queryWMSServiceInfo, queryWMSLayer, } from '../../query/queryWMS';
|
|
2
|
+
export { wmsQueryClient } from './wmsQueryClient';
|
|
3
|
+
export { setWMSGetCapabilitiesFetcher } from './utils';
|
|
4
|
+
export { getWMSServiceId } from './getWMSServiceId';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Capability, WMSGetCapabilities, Header, LayerProps, LayerTree, WMSLayerFromGetCapabilities, WMSServiceInfo, WMTSGetCapabilities, OGCWMSWMTSGetCapabilities } from '../../components/types';
|
|
2
|
+
/**
|
|
3
|
+
* A LayerTree with deeply nested children will be flattened into a 1D array.
|
|
4
|
+
* Children properties are removed and result is sorted alphabetically by the layers title.
|
|
5
|
+
* @param layerTree a WMS LayerTree
|
|
6
|
+
* @returns Flat array of layers as LayerProps[]
|
|
7
|
+
*/
|
|
8
|
+
export declare const privateWmsFlattenLayerTree: (layerTree: LayerTree) => LayerProps[];
|
|
9
|
+
export declare const privateGetOGCCapabilitiesUrl: (url?: string, service?: string, additionalParams?: {}) => string;
|
|
10
|
+
export declare const privateWmsGetCapabilities: (serviceUrl: string, headers?: Header[], forceReload?: boolean) => Promise<WMSGetCapabilities>;
|
|
11
|
+
export declare const privateWmtsGetCapabilities: (serviceUrl: string, headers?: Header[], forceReload?: boolean) => Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* privateWmsGetCapabilityElement
|
|
14
|
+
* @param jsonData
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare const privateWmsGetCapabilityElement: (jsonData: WMSGetCapabilities) => Capability;
|
|
18
|
+
export declare const privateCheckException: (jsonData: WMSGetCapabilities) => string | undefined;
|
|
19
|
+
export declare const privateWmsGetRootLayerFromGetCapabilities: (jsonData: WMSGetCapabilities) => WMSLayerFromGetCapabilities;
|
|
20
|
+
export declare const privateCheckVersion130: (jsonData: WMSGetCapabilities) => void;
|
|
21
|
+
export declare const privateCheckVersion: (jsonData: WMSGetCapabilities) => string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Returns a LayerTree object representing hierarchical structure of Lahyers in the WMS GetCapabilities document
|
|
24
|
+
* @param jsonData WMSGetCapabilities
|
|
25
|
+
* @returns LayerTree
|
|
26
|
+
*/
|
|
27
|
+
export declare const privateWmsGetLayerTree: (jsonData: OGCWMSWMTSGetCapabilities) => LayerTree | null;
|
|
28
|
+
/**
|
|
29
|
+
* Builds a standardized LayerTree object based on WMSLayerFromGetCapabilities object.
|
|
30
|
+
* @param wmsLayer The WMSLayerFromGetCapabilities object
|
|
31
|
+
* @param nestedPath - Optional, only to be used by privateWmsBuildLayerTreeFromNestedWMSLayer
|
|
32
|
+
* @param nestedLayerPath - Optional, only to be used by privateWmsBuildLayerTreeFromNestedWMSLayer
|
|
33
|
+
* @returns A LayerTree object.
|
|
34
|
+
*/
|
|
35
|
+
export declare const privateWmsBuildLayerTreeFromNestedWMSLayer: (wmsLayer: WMSLayerFromGetCapabilities, nestedPath?: string[], nestedLayerPath?: LayerProps[]) => LayerTree;
|
|
36
|
+
export type GetCapabilitiesFunctionType = (serviceUrl: string) => Promise<WMSGetCapabilities>;
|
|
37
|
+
export declare const setWMSGetCapabilitiesFetcher: (functionToSet: GetCapabilitiesFunctionType | null) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Returns details about the WMS service. You are encouraged to use queryWMSServiceInfo instead.
|
|
40
|
+
* @param getCapabilitiesJson
|
|
41
|
+
* @param serviceUrl
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
export declare const privateGetWMSServiceInfo: (getCapabilitiesJson: WMSGetCapabilities, serviceUrl: string) => WMSServiceInfo;
|
|
45
|
+
/**
|
|
46
|
+
* Returns details about the WMTS service. You are encouraged to use queryWMSServiceInfo instead.
|
|
47
|
+
* @param getCapabilitiesJson
|
|
48
|
+
* @param serviceUrl
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
export declare const privateGetWMTSServiceInfo: (getCapabilitiesJson: WMTSGetCapabilities, serviceUrl: string) => WMSServiceInfo;
|
|
52
|
+
/**
|
|
53
|
+
* Makes a uniform and harmonized URL used as caching key in TanStack
|
|
54
|
+
* @param serviceUrl
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
export declare const makeQueryKeyFroMServiceUrl: (serviceUrl: string) => string;
|
|
58
|
+
/**
|
|
59
|
+
* Parses WMTS GetCapabilities and returns an array of LayerProps
|
|
60
|
+
* @param getCapabilities
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
export declare const handleWMTSGetCapabilities: (getCapabilities: WMTSGetCapabilities) => LayerProps[];
|
|
64
|
+
export declare const handleWMTSGetCapabilitiesForLayer: (getCapabilities: WMTSGetCapabilities, layerName: string) => LayerProps | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/query-core';
|
|
2
|
+
/**
|
|
3
|
+
* This is the default TanStack QueryClient used for the query functions.
|
|
4
|
+
* It can be used in react by a provider to provide the query client to the hook functions.
|
|
5
|
+
* This ensures that TanStack keeps the same store for both the hooks and the query functions.
|
|
6
|
+
*/
|
|
7
|
+
export declare const wmsQueryClient: QueryClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import i18n from 'i18next';
|
|
3
|
+
export declare const WEBMAP_NAMESPACE = "webmap";
|
|
4
|
+
export declare const initWebmapTestI18n: () => void;
|
|
5
|
+
export { i18n };
|
|
6
|
+
export declare const translateInTestsAndStories: (t: TFunction | undefined, key: string, params?: Record<string, string | number> | undefined) => string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { EPSGCode } from '@opengeoweb/shared';
|
|
2
|
+
export interface TileSettings {
|
|
3
|
+
home: string;
|
|
4
|
+
minLevel: number;
|
|
5
|
+
maxLevel: number;
|
|
6
|
+
tileServerType: string;
|
|
7
|
+
copyRight: string;
|
|
8
|
+
origX?: number;
|
|
9
|
+
origY?: number;
|
|
10
|
+
resolution?: number;
|
|
11
|
+
title?: string;
|
|
12
|
+
tileSize?: number;
|
|
13
|
+
tileServerFormat?: string;
|
|
14
|
+
tms?: boolean;
|
|
15
|
+
urlTemplate?: (basePath: string) => string;
|
|
16
|
+
}
|
|
17
|
+
export type TileSettingPerProjection = {
|
|
18
|
+
[key in EPSGCode]?: TileSettings;
|
|
19
|
+
};
|
|
20
|
+
export interface Title {
|
|
21
|
+
title?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TileServerDefinition extends Title, TileSettingPerProjection {
|
|
24
|
+
}
|
|
25
|
+
export type TileServerMap = Map<string, TileServerDefinition>;
|
|
26
|
+
export type TileServerSettings = Record<string, TileServerDefinition>;
|
|
27
|
+
export declare const tilesettings: TileServerSettings;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WMJSDimension, WMLayer } from '../components';
|
|
2
|
+
export declare const generateLayerId: () => string;
|
|
3
|
+
export declare const generateMapId: () => string;
|
|
4
|
+
export declare const generateTimesliderId: () => string;
|
|
5
|
+
/**
|
|
6
|
+
* Registers a WMJSLayer in a lookuptable with a layerId
|
|
7
|
+
* @param {WMLayer} wmLayer
|
|
8
|
+
* @param {string} layerId
|
|
9
|
+
*/
|
|
10
|
+
export declare const registerWMLayer: (wmLayer: WMLayer, layerId: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Get the WMLayer from the lookuptable with layerId
|
|
13
|
+
* @param {string} layerId
|
|
14
|
+
*/
|
|
15
|
+
export declare const getWMLayerById: (layerId: string) => WMLayer;
|
|
16
|
+
export declare const unRegisterWMJSLayer: (layerId: string) => void;
|
|
17
|
+
export declare const unRegisterAllWMJSLayersAndMaps: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the WMJSDimension object for given layerId and dimension name
|
|
20
|
+
* @param layerId The layerId
|
|
21
|
+
* @param dimensionName The dimension to lookup
|
|
22
|
+
*/
|
|
23
|
+
export declare const getWMJSDimensionForLayerAndDimension: (layerId: string, dimensionName: string | undefined) => WMJSDimension | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the WMJSTimeDimension for given activeLayerId and dimensions list
|
|
26
|
+
* @param layerId: The layer id to search the WMJSDimension for
|
|
27
|
+
* @return: The WMJSDimension if found, otherwise null
|
|
28
|
+
*/
|
|
29
|
+
export declare const getWMJSTimeDimensionForLayerId: (layerId: string) => WMJSDimension;
|
|
30
|
+
export declare const roundWithTimeStep: (unixTime: number, timeStep: number, type?: string) => number;
|
|
31
|
+
export declare const getCorrectWMSDimName: (origDimName: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.0",
|
|
4
4
|
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|
|
31
|
+
"!dist/package.json",
|
|
31
32
|
"README.md",
|
|
32
33
|
"package.json"
|
|
33
34
|
]
|