@loaders.gl/wms 3.4.0 → 3.4.2
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/dist.min.js +15 -7
- package/dist/es5/csw-capabilities-loader.js +1 -1
- package/dist/es5/csw-domain-loader.js +1 -1
- package/dist/es5/csw-records-loader.js +1 -1
- package/dist/es5/gml-loader.js +1 -1
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lerc-loader.js +1 -1
- package/dist/es5/lib/parsers/wms/parse-wms-capabilities.js +8 -5
- package/dist/es5/lib/parsers/wms/parse-wms-capabilities.js.map +1 -1
- package/dist/es5/lib/parsers/wms/parse-wms-layer-description.js +2 -1
- package/dist/es5/lib/parsers/wms/parse-wms-layer-description.js.map +1 -1
- package/dist/es5/lib/services/ogc/csw-service.js.map +1 -1
- package/dist/es5/lib/services/ogc/wms-service.js +7 -2
- package/dist/es5/lib/services/ogc/wms-service.js.map +1 -1
- package/dist/es5/wip/wcs-capabilities-loader.js +1 -1
- package/dist/es5/wip/wfs-capabilities-loader.js +1 -1
- package/dist/es5/wip/wms-feature-info-loader.js.map +1 -1
- package/dist/es5/wip/wms-layer-description-loader.js.map +1 -1
- package/dist/es5/wip/wmts-capabilities-loader.js +1 -1
- package/dist/es5/wip/wmts-capabilities-loader.js.map +1 -1
- package/dist/es5/wms-capabilities-loader.js +1 -1
- package/dist/es5/wms-capabilities-loader.js.map +1 -1
- package/dist/es5/wms-error-loader.js +1 -1
- package/dist/esm/csw-capabilities-loader.js +1 -1
- package/dist/esm/csw-domain-loader.js +1 -1
- package/dist/esm/csw-records-loader.js +1 -1
- package/dist/esm/gml-loader.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lerc-loader.js +1 -1
- package/dist/esm/lib/parsers/wms/parse-wms-capabilities.js +8 -5
- package/dist/esm/lib/parsers/wms/parse-wms-capabilities.js.map +1 -1
- package/dist/esm/lib/parsers/wms/parse-wms-layer-description.js +2 -1
- package/dist/esm/lib/parsers/wms/parse-wms-layer-description.js.map +1 -1
- package/dist/esm/lib/services/ogc/csw-service.js.map +1 -1
- package/dist/esm/lib/services/ogc/wms-service.js +6 -1
- package/dist/esm/lib/services/ogc/wms-service.js.map +1 -1
- package/dist/esm/wip/wcs-capabilities-loader.js +1 -1
- package/dist/esm/wip/wfs-capabilities-loader.js +1 -1
- package/dist/esm/wip/wms-feature-info-loader.js.map +1 -1
- package/dist/esm/wip/wms-layer-description-loader.js.map +1 -1
- package/dist/esm/wip/wmts-capabilities-loader.js +1 -1
- package/dist/esm/wip/wmts-capabilities-loader.js.map +1 -1
- package/dist/esm/wms-capabilities-loader.js +1 -1
- package/dist/esm/wms-capabilities-loader.js.map +1 -1
- package/dist/esm/wms-error-loader.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts +2 -2
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.js +8 -6
- package/dist/lib/parsers/wms/parse-wms-layer-description.d.ts +2 -1
- package/dist/lib/parsers/wms/parse-wms-layer-description.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-layer-description.js +1 -1
- package/dist/lib/services/ogc/csw-service.d.ts +5 -3
- package/dist/lib/services/ogc/csw-service.d.ts.map +1 -1
- package/dist/lib/services/ogc/csw-service.js +1 -2
- package/dist/lib/services/ogc/wms-service.d.ts +31 -6
- package/dist/lib/services/ogc/wms-service.d.ts.map +1 -1
- package/dist/lib/services/ogc/wms-service.js +6 -1
- package/dist/wip/wms-feature-info-loader.d.ts +3 -3
- package/dist/wip/wms-feature-info-loader.d.ts.map +1 -1
- package/dist/wip/wms-layer-description-loader.d.ts +3 -3
- package/dist/wip/wms-layer-description-loader.d.ts.map +1 -1
- package/dist/wip/wmts-capabilities-loader.d.ts +3 -2
- package/dist/wip/wmts-capabilities-loader.d.ts.map +1 -1
- package/dist/wms-capabilities-loader.d.ts +11 -7
- package/dist/wms-capabilities-loader.d.ts.map +1 -1
- package/dist/wms-capabilities-loader.js +6 -2
- package/package.json +6 -6
- package/src/index.ts +10 -3
- package/src/lib/parsers/wms/parse-wms-capabilities.ts +10 -9
- package/src/lib/parsers/wms/parse-wms-layer-description.ts +6 -2
- package/src/lib/services/ogc/csw-service.ts +12 -4
- package/src/lib/services/ogc/wms-service.ts +16 -3
- package/src/wip/wms-feature-info-loader.ts +4 -3
- package/src/wip/wms-layer-description-loader.ts +3 -3
- package/src/wip/wmts-capabilities-loader.ts +3 -2
- package/src/wms-capabilities-loader.ts +22 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"names":[],"mappings":"AAWA,gHAAgH;AAChH,MAAM,MAAM,eAAe,GAAG;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8GAA8G;IAC9G,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0GAA0G;IAC1G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,2HAA2H;IAC3H,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAA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AAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACxE,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oHAAoH;IACpH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG;IACvB,sDAAsD;IACtD,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,kDAAkD;IAClD,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kGAAkG;IAClG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,GAAG,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"parse-wms-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"names":[],"mappings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CAAC,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG;IACvB,sDAAsD;IACtD,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,kDAAkD;IAClD,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kGAAkG;IAClG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,GAAG,CAAC,EAAE,OAAO,CAAC;CAEf,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,2BAA2B,GACpC,eAAe,CAwBjB"}
|
|
@@ -89,8 +89,8 @@ function extractLayer(xmlLayer) {
|
|
|
89
89
|
// All layers must have a title
|
|
90
90
|
title: String(xmlLayer?.Title || ''),
|
|
91
91
|
// Name is required only if renderable
|
|
92
|
-
name: String(xmlLayer?.Name),
|
|
93
|
-
abstract: String(xmlLayer?.Abstract),
|
|
92
|
+
name: xmlLayer?.Name && String(xmlLayer?.Name),
|
|
93
|
+
abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),
|
|
94
94
|
keywords: (0, parse_xml_helpers_1.getXMLStringArray)(xmlLayer.KeywordList?.Keyword)
|
|
95
95
|
};
|
|
96
96
|
// WMS 1.3.0 changes SRS to CRS
|
|
@@ -215,16 +215,18 @@ function extractDimension(xmlDimension) {
|
|
|
215
215
|
/** Traverse layers and inject missing props from parents */
|
|
216
216
|
// eslint-disable-next-line complexity
|
|
217
217
|
function addInheritedLayerProps(layer, parent) {
|
|
218
|
-
if (parent
|
|
218
|
+
if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {
|
|
219
219
|
layer.geographicBoundingBox = [...parent.geographicBoundingBox];
|
|
220
220
|
}
|
|
221
|
-
if (parent
|
|
221
|
+
if (parent?.crs && !layer.crs) {
|
|
222
222
|
layer.crs = [...parent.crs];
|
|
223
223
|
}
|
|
224
|
-
if (parent
|
|
224
|
+
if (parent?.boundingBoxes && !layer.boundingBoxes) {
|
|
225
225
|
layer.boundingBoxes = [...parent.boundingBoxes];
|
|
226
226
|
}
|
|
227
|
-
|
|
227
|
+
if (parent?.dimensions && !layer.dimensions) {
|
|
228
|
+
layer.dimensions = [...parent.dimensions];
|
|
229
|
+
}
|
|
228
230
|
for (const subLayer of layer.layers || []) {
|
|
229
231
|
addInheritedLayerProps(subLayer, layer);
|
|
230
232
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { XMLLoaderOptions } from '@loaders.gl/xml';
|
|
1
2
|
/** Layer description - response to a WMS `DescribeLayer` request */
|
|
2
3
|
export type WMSLayerDescription = {
|
|
3
4
|
layers: {}[];
|
|
@@ -6,5 +7,5 @@ export type WMSLayerDescription = {
|
|
|
6
7
|
* Parses a typed data structure from raw XML for `GetFeatureInfo` response
|
|
7
8
|
* @note Error handlings is fairly weak
|
|
8
9
|
*/
|
|
9
|
-
export declare function parseWMSLayerDescription(text: string, options
|
|
10
|
+
export declare function parseWMSLayerDescription(text: string, options?: XMLLoaderOptions): WMSLayerDescription;
|
|
10
11
|
//# sourceMappingURL=parse-wms-layer-description.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-layer-description.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-wms-layer-description.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAGtD,qEAAqE;AACrE,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,EAAE,EAAE,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACzB,mBAAmB,CAIrB"}
|
|
@@ -8,7 +8,7 @@ const xml_1 = require("@loaders.gl/xml");
|
|
|
8
8
|
* @note Error handlings is fairly weak
|
|
9
9
|
*/
|
|
10
10
|
function parseWMSLayerDescription(text, options) {
|
|
11
|
-
const parsedXML = xml_1.XMLLoader.parseTextSync(text, options);
|
|
11
|
+
const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, options);
|
|
12
12
|
// TODO - implement parser
|
|
13
13
|
return parsedXML;
|
|
14
14
|
}
|
|
@@ -7,7 +7,7 @@ type CSWCommonParameters = {
|
|
|
7
7
|
/** In case the endpoint supports multiple services */
|
|
8
8
|
service?: 'CSW';
|
|
9
9
|
/** In case the endpoint supports multiple CSW versions */
|
|
10
|
-
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0'
|
|
10
|
+
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0';
|
|
11
11
|
};
|
|
12
12
|
export type CSWGetCapabilitiesParameters = CSWCommonParameters & {
|
|
13
13
|
/** Request type */
|
|
@@ -23,8 +23,11 @@ export type CSWGetDomainParameters = CSWCommonParameters & {
|
|
|
23
23
|
/** Request type */
|
|
24
24
|
request?: 'GetDomain';
|
|
25
25
|
};
|
|
26
|
+
/** Describes a service or resource exposed by the catalog */
|
|
26
27
|
export type Service = {
|
|
28
|
+
/** name of service or resource */
|
|
27
29
|
name: string;
|
|
30
|
+
/** type of service or resource */
|
|
28
31
|
type: string;
|
|
29
32
|
url: string;
|
|
30
33
|
params?: string;
|
|
@@ -34,10 +37,9 @@ export type CSWServiceProps = DataSourceProps & {
|
|
|
34
37
|
url: string;
|
|
35
38
|
};
|
|
36
39
|
/**
|
|
37
|
-
* The CSWService class
|
|
40
|
+
* The CSWService class
|
|
38
41
|
* - provides type safe methods to form URLs to a CSW service
|
|
39
42
|
* - provides type safe methods to query and parse results (and errors) from a CSW service
|
|
40
|
-
* - implements the ImageService interface
|
|
41
43
|
* @note Only the URL parameter conversion is supported. XML posts are not supported.
|
|
42
44
|
*/
|
|
43
45
|
export declare class CSWService extends DataSource<CSWServiceProps> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csw-service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ogc/csw-service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAErD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAGtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAG5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAC;AAK1D,KAAK,mBAAmB,GAAG;IACzB,sDAAsD;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"csw-service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ogc/csw-service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAErD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAGtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAG5D,OAAO,KAAK,EAAC,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EK;IACL,SAAS,CAAC,UAAU,CAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAeT,qFAAqF;IACrF,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IAQ5E,+BAA+B;IAC/B,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,KAAK;CAIvD"}
|
|
@@ -8,10 +8,9 @@ const csw_records_loader_1 = require("../../../csw-records-loader");
|
|
|
8
8
|
const csw_domain_loader_1 = require("../../../csw-domain-loader");
|
|
9
9
|
const wms_error_loader_1 = require("../../../wms-error-loader");
|
|
10
10
|
/**
|
|
11
|
-
* The CSWService class
|
|
11
|
+
* The CSWService class
|
|
12
12
|
* - provides type safe methods to form URLs to a CSW service
|
|
13
13
|
* - provides type safe methods to query and parse results (and errors) from a CSW service
|
|
14
|
-
* - implements the ImageService interface
|
|
15
14
|
* @note Only the URL parameter conversion is supported. XML posts are not supported.
|
|
16
15
|
*/
|
|
17
16
|
class CSWService extends data_source_1.DataSource {
|
|
@@ -27,6 +27,10 @@ export type WMSParameters = {
|
|
|
27
27
|
styles?: unknown;
|
|
28
28
|
/** Any additional parameters specific to this WMSService (GetMap) */
|
|
29
29
|
transparent?: boolean;
|
|
30
|
+
/** If layer supports time dimension */
|
|
31
|
+
time?: string;
|
|
32
|
+
/** If layer supports elevation dimension */
|
|
33
|
+
elevation?: string;
|
|
30
34
|
};
|
|
31
35
|
/** Parameters for GetCapabilities */
|
|
32
36
|
export type WMSGetCapabilitiesParameters = {
|
|
@@ -43,6 +47,8 @@ export type WMSGetMapParameters = {
|
|
|
43
47
|
width: number;
|
|
44
48
|
/** pixels */
|
|
45
49
|
height: number;
|
|
50
|
+
/** requested format for the return image. can be provided in service constructor */
|
|
51
|
+
format?: 'image/png';
|
|
46
52
|
/** Layers to render - can be provided in service constructor */
|
|
47
53
|
layers?: string | string[];
|
|
48
54
|
/** Coordinate Reference System for the image (not bounding box). can be provided in service constructor. */
|
|
@@ -51,8 +57,10 @@ export type WMSGetMapParameters = {
|
|
|
51
57
|
styles?: unknown;
|
|
52
58
|
/** Don't render background when no data. can be provided in service constructor */
|
|
53
59
|
transparent?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
|
|
60
|
+
/** If layer supports time dimension */
|
|
61
|
+
time?: string;
|
|
62
|
+
/** If layer supports elevation dimension */
|
|
63
|
+
elevation?: string;
|
|
56
64
|
};
|
|
57
65
|
/** GetMap parameters that are specific to the current view */
|
|
58
66
|
export type WMSGetMapViewParameters = {
|
|
@@ -171,12 +179,28 @@ export declare class WMSService extends ImageSource<WMSServiceProps> {
|
|
|
171
179
|
} | {
|
|
172
180
|
id: string;
|
|
173
181
|
name: string;
|
|
174
|
-
parse: (arrayBuffer: ArrayBuffer, options?: import("../../../wms-capabilities-loader").WMSLoaderOptions | undefined) => Promise<WMSFeatureInfo>;
|
|
175
|
-
parseTextSync: (text: string, options?: import("../../../wms-capabilities-loader").WMSLoaderOptions | undefined) => WMSFeatureInfo;
|
|
176
182
|
module: string;
|
|
177
183
|
version: any;
|
|
178
184
|
worker: boolean;
|
|
179
185
|
extensions: string[];
|
|
186
|
+
/** list of layers to query.. (GetFeatureInfo) */
|
|
187
|
+
mimeTypes: string[];
|
|
188
|
+
testText: (text: string) => boolean;
|
|
189
|
+
options: {
|
|
190
|
+
wms: {};
|
|
191
|
+
};
|
|
192
|
+
parse: (arrayBuffer: ArrayBuffer, options?: import("../../../wms-capabilities-loader").WMSCapabilitiesLoaderOptions | undefined) => Promise<WMSCapabilities>;
|
|
193
|
+
parseTextSync: (text: string, options?: import("../../../wms-capabilities-loader").WMSCapabilitiesLoaderOptions | undefined) => WMSCapabilities;
|
|
194
|
+
} | {
|
|
195
|
+
id: string;
|
|
196
|
+
name: string;
|
|
197
|
+
parse: (arrayBuffer: ArrayBuffer, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => Promise<WMSFeatureInfo>;
|
|
198
|
+
parseTextSync: (text: string, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => WMSFeatureInfo;
|
|
199
|
+
module: string;
|
|
200
|
+
version: any;
|
|
201
|
+
worker: boolean;
|
|
202
|
+
extensions: string[];
|
|
203
|
+
/** list of layers to query.. (GetFeatureInfo) */
|
|
180
204
|
mimeTypes: string[];
|
|
181
205
|
testText: (text: string) => boolean;
|
|
182
206
|
options: {
|
|
@@ -185,12 +209,13 @@ export declare class WMSService extends ImageSource<WMSServiceProps> {
|
|
|
185
209
|
} | {
|
|
186
210
|
id: string;
|
|
187
211
|
name: string;
|
|
188
|
-
parse: (arrayBuffer: ArrayBuffer, options?: import("
|
|
189
|
-
parseTextSync: (text: string, options?: import("
|
|
212
|
+
parse: (arrayBuffer: ArrayBuffer, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => Promise<WMSLayerDescription>;
|
|
213
|
+
parseTextSync: (text: string, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => WMSLayerDescription;
|
|
190
214
|
module: string;
|
|
191
215
|
version: any;
|
|
192
216
|
worker: boolean;
|
|
193
217
|
extensions: string[];
|
|
218
|
+
/** list of layers to query.. (GetFeatureInfo) */
|
|
194
219
|
mimeTypes: string[];
|
|
195
220
|
testText: (text: string) => boolean;
|
|
196
221
|
options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ogc/wms-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAIlD,OAAO,KAAK,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AACxF,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,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G,OAAO,CAAA;KAAC,EACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IA4BT,oBAAoB,CAAC,WAAW,SAAS;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,EACnE,aAAa,EAAE,WAAW,GACzB,WAAW;IAUd,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAG,MAAM;IAwCnF,+DAA+D;IAC/D,gBAAgB,CACd,SAAS,EAAE,OAAO,EAClB,aAAa,EAAE,aAAa,GAC3B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAkB1C,8EAA8E;cAC9D,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOpE,qFAAqF;IACrF,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IAY5E,+BAA+B;IAC/B,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,KAAK;CAIvD"}
|
|
@@ -44,6 +44,8 @@ class WMSService extends image_source_1.ImageSource {
|
|
|
44
44
|
format: 'image/png',
|
|
45
45
|
info_format: 'text/plain',
|
|
46
46
|
transparent: undefined,
|
|
47
|
+
time: undefined,
|
|
48
|
+
elevation: undefined,
|
|
47
49
|
...props.wmsParameters
|
|
48
50
|
};
|
|
49
51
|
this.vendorParameters = props.vendorParameters || {};
|
|
@@ -137,6 +139,8 @@ class WMSService extends image_source_1.ImageSource {
|
|
|
137
139
|
version: this.wmsParameters.version,
|
|
138
140
|
format: this.wmsParameters.format,
|
|
139
141
|
transparent: this.wmsParameters.transparent,
|
|
142
|
+
time: this.wmsParameters.time,
|
|
143
|
+
elevation: this.wmsParameters.elevation,
|
|
140
144
|
layers: this.wmsParameters.layers,
|
|
141
145
|
styles: this.wmsParameters.styles,
|
|
142
146
|
crs: this.wmsParameters.crs,
|
|
@@ -212,9 +216,10 @@ class WMSService extends image_source_1.ImageSource {
|
|
|
212
216
|
...vendorParameters
|
|
213
217
|
};
|
|
214
218
|
// Encode the keys
|
|
219
|
+
const IGNORE_EMPTY_KEYS = ['transparent', 'time', 'elevation'];
|
|
215
220
|
for (const [key, value] of Object.entries(allParameters)) {
|
|
216
221
|
// hack to preserve test cases. Not super clear if keys should be included when values are undefined
|
|
217
|
-
if (key
|
|
222
|
+
if (!IGNORE_EMPTY_KEYS.includes(key) || value) {
|
|
218
223
|
url += first ? '?' : '&';
|
|
219
224
|
first = false;
|
|
220
225
|
url += this._getURLParameter(key, value, wmsParameters);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
|
-
import {
|
|
2
|
+
import type { XMLLoaderOptions } from '@loaders.gl/xml';
|
|
3
3
|
import type { WMSFeatureInfo } from '../lib/parsers/wms/parse-wms-features';
|
|
4
4
|
export { WMSFeatureInfo };
|
|
5
5
|
/**
|
|
@@ -8,8 +8,8 @@ export { WMSFeatureInfo };
|
|
|
8
8
|
export declare const WMSFeatureInfoLoader: {
|
|
9
9
|
id: string;
|
|
10
10
|
name: string;
|
|
11
|
-
parse: (arrayBuffer: ArrayBuffer, options?:
|
|
12
|
-
parseTextSync: (text: string, options?:
|
|
11
|
+
parse: (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) => Promise<WMSFeatureInfo>;
|
|
12
|
+
parseTextSync: (text: string, options?: XMLLoaderOptions) => WMSFeatureInfo;
|
|
13
13
|
module: string;
|
|
14
14
|
version: any;
|
|
15
15
|
worker: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-feature-info-loader.d.ts","sourceRoot":"","sources":["../../src/wip/wms-feature-info-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"wms-feature-info-loader.d.ts","sourceRoot":"","sources":["../../src/wip/wms-feature-info-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,uCAAuC,CAAC;AAG1E,OAAO,EAAC,cAAc,EAAC,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;yBAMJ,WAAW,YAAY,gBAAgB;0BAE5C,MAAM,YAAY,gBAAgB;;;;;;;;;;CACzD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,gBAAuC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
|
-
import type {
|
|
2
|
+
import type { XMLLoaderOptions } from '@loaders.gl/xml';
|
|
3
3
|
import type { WMSLayerDescription } from '../lib/parsers/wms/parse-wms-layer-description';
|
|
4
4
|
export { WMSLayerDescription };
|
|
5
5
|
/**
|
|
@@ -8,8 +8,8 @@ export { WMSLayerDescription };
|
|
|
8
8
|
export declare const WMSLayerDescriptionLoader: {
|
|
9
9
|
id: string;
|
|
10
10
|
name: string;
|
|
11
|
-
parse: (arrayBuffer: ArrayBuffer, options?:
|
|
12
|
-
parseTextSync: (text: string, options?:
|
|
11
|
+
parse: (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) => Promise<WMSLayerDescription>;
|
|
12
|
+
parseTextSync: (text: string, options?: XMLLoaderOptions) => WMSLayerDescription;
|
|
13
13
|
module: string;
|
|
14
14
|
version: any;
|
|
15
15
|
worker: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-layer-description-loader.d.ts","sourceRoot":"","sources":["../../src/wip/wms-layer-description-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"wms-layer-description-loader.d.ts","sourceRoot":"","sources":["../../src/wip/wms-layer-description-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gDAAgD,CAAC;AAGxF,OAAO,EAAC,mBAAmB,EAAC,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;yBAMT,WAAW,YAAY,gBAAgB;0BAE5C,MAAM,YAAY,gBAAgB;;;;;;;;;;CACzD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,gBAA4C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { LoaderWithParser
|
|
2
|
-
|
|
1
|
+
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
|
+
import type { XMLLoaderOptions } from '@loaders.gl/xml';
|
|
3
|
+
export type WMTSLoaderOptions = XMLLoaderOptions & {
|
|
3
4
|
wmts?: {};
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wmts-capabilities-loader.d.ts","sourceRoot":"","sources":["../../src/wip/wmts-capabilities-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"wmts-capabilities-loader.d.ts","sourceRoot":"","sources":["../../src/wip/wmts-capabilities-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAUtD,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,IAAI,CAAC,EAAE,EAAE,CAAC;CACX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;yBAaN,WAAW,YAAY,iBAAiB;0BAE7C,MAAM,YAAY,iBAAiB;CAC1D,CAAC;AAEF,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAG1C;AAED,eAAO,MAAM,gCAAgC,EAAE,gBAAyC,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import type { LoaderWithParser
|
|
2
|
-
import type {
|
|
3
|
-
export type { WMSCapabilities };
|
|
4
|
-
export type
|
|
1
|
+
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
|
+
import type { XMLLoaderOptions } from '@loaders.gl/xml';
|
|
3
|
+
export type { WMSCapabilities, WMSLayer, WMSBoundingBox, WMSDimension, WMSRequest, WMSExceptions } from './lib/parsers/wms/parse-wms-capabilities';
|
|
4
|
+
export type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {
|
|
5
5
|
wms?: {
|
|
6
6
|
/** Add inherited layer information to sub layers */
|
|
7
7
|
inheritedLayerProps?: boolean;
|
|
8
|
-
/**
|
|
8
|
+
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
|
|
9
|
+
includeRawData?: boolean;
|
|
10
|
+
/** Include the original XML document text. May contain additional information. */
|
|
11
|
+
includeXMLText?: boolean;
|
|
12
|
+
/** @deprecated Use options.includeRawData` */
|
|
9
13
|
raw?: boolean;
|
|
10
14
|
};
|
|
11
15
|
};
|
|
@@ -24,8 +28,8 @@ export declare const WMSCapabilitiesLoader: {
|
|
|
24
28
|
options: {
|
|
25
29
|
wms: {};
|
|
26
30
|
};
|
|
27
|
-
parse: (arrayBuffer: ArrayBuffer, options?:
|
|
28
|
-
parseTextSync: (text: string, options?:
|
|
31
|
+
parse: (arrayBuffer: ArrayBuffer, options?: WMSCapabilitiesLoaderOptions) => Promise<import("./lib/parsers/wms/parse-wms-capabilities").WMSCapabilities>;
|
|
32
|
+
parseTextSync: (text: string, options?: WMSCapabilitiesLoaderOptions) => import("./lib/parsers/wms/parse-wms-capabilities").WMSCapabilities;
|
|
29
33
|
};
|
|
30
34
|
declare function testXMLFile(text: string): boolean;
|
|
31
35
|
export declare const _typecheckWMSCapabilitiesLoader: LoaderWithParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-capabilities-loader.d.ts","sourceRoot":"","sources":["../src/wms-capabilities-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"wms-capabilities-loader.d.ts","sourceRoot":"","sources":["../src/wms-capabilities-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAQtD,YAAY,EACV,eAAe,EACf,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACd,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,GAAG;IAC5D,GAAG,CAAC,EAAE;QACJ,oDAAoD;QACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,kGAAkG;QAClG,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,kFAAkF;QAClF,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,8CAA8C;QAC9C,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;yBAaL,WAAW,YAAY,4BAA4B;0BAGxD,MAAM,YAAY,4BAA4B;CAGrE,CAAC;AAEF,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAG1C;AAED,eAAO,MAAM,+BAA+B,EAAE,gBAAwC,CAAC"}
|
|
@@ -21,8 +21,12 @@ exports.WMSCapabilitiesLoader = {
|
|
|
21
21
|
options: {
|
|
22
22
|
wms: {}
|
|
23
23
|
},
|
|
24
|
-
parse: async (arrayBuffer, options) =>
|
|
25
|
-
|
|
24
|
+
parse: async (arrayBuffer, options) =>
|
|
25
|
+
// TODO pass in XML options
|
|
26
|
+
(0, parse_wms_capabilities_1.parseWMSCapabilities)(new TextDecoder().decode(arrayBuffer), options?.wms),
|
|
27
|
+
parseTextSync: (text, options) =>
|
|
28
|
+
// TODO pass in XML options
|
|
29
|
+
(0, parse_wms_capabilities_1.parseWMSCapabilities)(text, options?.wms)
|
|
26
30
|
};
|
|
27
31
|
function testXMLFile(text) {
|
|
28
32
|
// TODO - There could be space first.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/wms",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Framework-independent loaders for the WMS (Web Map Service) standard",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime": "^7.3.1",
|
|
42
|
-
"@loaders.gl/images": "3.4.
|
|
43
|
-
"@loaders.gl/loader-utils": "3.4.
|
|
44
|
-
"@loaders.gl/schema": "3.4.
|
|
45
|
-
"@loaders.gl/xml": "3.4.
|
|
42
|
+
"@loaders.gl/images": "3.4.2",
|
|
43
|
+
"@loaders.gl/loader-utils": "3.4.2",
|
|
44
|
+
"@loaders.gl/schema": "3.4.2",
|
|
45
|
+
"@loaders.gl/xml": "3.4.2",
|
|
46
46
|
"@turf/rewind": "^5.1.5",
|
|
47
47
|
"deep-strict-equal": "^0.2.0",
|
|
48
48
|
"lerc": "^4.0.1"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"xmldom": "0.6.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d27459f32dcd6dd9a0addd8cab5fc627486dbea9"
|
|
54
54
|
}
|
package/src/index.ts
CHANGED
|
@@ -17,9 +17,13 @@ export {CSWRecordsLoader} from './csw-records-loader';
|
|
|
17
17
|
|
|
18
18
|
export {WMSErrorLoader} from './wms-error-loader';
|
|
19
19
|
|
|
20
|
-
export type {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export type {
|
|
21
|
+
WMSCapabilities,
|
|
22
|
+
WMSLayer,
|
|
23
|
+
WMSBoundingBox,
|
|
24
|
+
WMSDimension
|
|
25
|
+
} from './wms-capabilities-loader';
|
|
26
|
+
export type {WMSCapabilitiesLoaderOptions} from './wms-capabilities-loader';
|
|
23
27
|
export {WMSCapabilitiesLoader} from './wms-capabilities-loader';
|
|
24
28
|
|
|
25
29
|
export type {WMSFeatureInfo as _WMSFeatureInfo} from './wip/wms-feature-info-loader';
|
|
@@ -75,3 +79,6 @@ export {ArcGISImageServer as _ArcGISImageServer} from './lib/services/arcgis/arc
|
|
|
75
79
|
// TODO - restore once esbuild bundling issues have been resolved
|
|
76
80
|
// export type {LERCData} from './lib/lerc/lerc-types';
|
|
77
81
|
// export {LERCLoader} from './lerc-loader';
|
|
82
|
+
|
|
83
|
+
/** @deprecated Use WMSCapabilitiesLoaderOptions */
|
|
84
|
+
export type {WMSCapabilitiesLoaderOptions as WMSLoaderOptions} from './wms-capabilities-loader';
|
|
@@ -143,7 +143,7 @@ export type WMSExceptions = {
|
|
|
143
143
|
mimeTypes: string[];
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
export type
|
|
146
|
+
export type ParseWMSCapabilitiesOptions = {
|
|
147
147
|
/** Add inherited layer information to sub layers */
|
|
148
148
|
inheritedLayerProps?: boolean;
|
|
149
149
|
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
|
|
@@ -152,7 +152,6 @@ export type parseWMSCapabilitiesOptions = {
|
|
|
152
152
|
includeXMLText?: boolean;
|
|
153
153
|
/** @deprecated Use includeRawData` */
|
|
154
154
|
raw?: boolean;
|
|
155
|
-
|
|
156
155
|
// xml options are passed through to xml loader
|
|
157
156
|
};
|
|
158
157
|
|
|
@@ -162,7 +161,7 @@ export type parseWMSCapabilitiesOptions = {
|
|
|
162
161
|
*/
|
|
163
162
|
export function parseWMSCapabilities(
|
|
164
163
|
xmlText: string,
|
|
165
|
-
options?:
|
|
164
|
+
options?: ParseWMSCapabilitiesOptions
|
|
166
165
|
): WMSCapabilities {
|
|
167
166
|
const parsedXML = XMLLoader.parseTextSync(xmlText, options);
|
|
168
167
|
const xmlCapabilities: any =
|
|
@@ -254,8 +253,8 @@ function extractLayer(xmlLayer: any): WMSLayer {
|
|
|
254
253
|
// All layers must have a title
|
|
255
254
|
title: String(xmlLayer?.Title || ''),
|
|
256
255
|
// Name is required only if renderable
|
|
257
|
-
name: String(xmlLayer?.Name),
|
|
258
|
-
abstract: String(xmlLayer?.Abstract),
|
|
256
|
+
name: xmlLayer?.Name && String(xmlLayer?.Name),
|
|
257
|
+
abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),
|
|
259
258
|
keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)
|
|
260
259
|
};
|
|
261
260
|
|
|
@@ -406,19 +405,21 @@ function extractDimension(xmlDimension: any): WMSDimension {
|
|
|
406
405
|
/** Traverse layers and inject missing props from parents */
|
|
407
406
|
// eslint-disable-next-line complexity
|
|
408
407
|
function addInheritedLayerProps(layer: WMSLayer, parent: WMSLayer | null): void {
|
|
409
|
-
if (parent
|
|
408
|
+
if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {
|
|
410
409
|
layer.geographicBoundingBox = [...parent.geographicBoundingBox];
|
|
411
410
|
}
|
|
412
411
|
|
|
413
|
-
if (parent
|
|
412
|
+
if (parent?.crs && !layer.crs) {
|
|
414
413
|
layer.crs = [...parent.crs];
|
|
415
414
|
}
|
|
416
415
|
|
|
417
|
-
if (parent
|
|
416
|
+
if (parent?.boundingBoxes && !layer.boundingBoxes) {
|
|
418
417
|
layer.boundingBoxes = [...parent.boundingBoxes];
|
|
419
418
|
}
|
|
420
419
|
|
|
421
|
-
|
|
420
|
+
if (parent?.dimensions && !layer.dimensions) {
|
|
421
|
+
layer.dimensions = [...parent.dimensions];
|
|
422
|
+
}
|
|
422
423
|
|
|
423
424
|
for (const subLayer of layer.layers || []) {
|
|
424
425
|
addInheritedLayerProps(subLayer, layer);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// loaders.gl, MIT license
|
|
2
2
|
|
|
3
|
+
import type {XMLLoaderOptions} from '@loaders.gl/xml';
|
|
3
4
|
import {XMLLoader} from '@loaders.gl/xml';
|
|
4
5
|
|
|
5
6
|
/** Layer description - response to a WMS `DescribeLayer` request */
|
|
@@ -11,8 +12,11 @@ export type WMSLayerDescription = {
|
|
|
11
12
|
* Parses a typed data structure from raw XML for `GetFeatureInfo` response
|
|
12
13
|
* @note Error handlings is fairly weak
|
|
13
14
|
*/
|
|
14
|
-
export function parseWMSLayerDescription(
|
|
15
|
-
|
|
15
|
+
export function parseWMSLayerDescription(
|
|
16
|
+
text: string,
|
|
17
|
+
options?: XMLLoaderOptions
|
|
18
|
+
): WMSLayerDescription {
|
|
19
|
+
const parsedXML = XMLLoader.parseTextSync?.(text, options);
|
|
16
20
|
// TODO - implement parser
|
|
17
21
|
return parsedXML as unknown as WMSLayerDescription;
|
|
18
22
|
}
|
|
@@ -20,7 +20,7 @@ type CSWCommonParameters = {
|
|
|
20
20
|
/** In case the endpoint supports multiple services */
|
|
21
21
|
service?: 'CSW';
|
|
22
22
|
/** In case the endpoint supports multiple CSW versions */
|
|
23
|
-
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0'
|
|
23
|
+
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0';
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export type CSWGetCapabilitiesParameters = CSWCommonParameters & {
|
|
@@ -41,17 +41,25 @@ export type CSWGetDomainParameters = CSWCommonParameters & {
|
|
|
41
41
|
// TBA
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/** Describes a service or resource exposed by the catalog */
|
|
45
|
+
export type Service = {
|
|
46
|
+
/** name of service or resource */
|
|
47
|
+
name: string;
|
|
48
|
+
/** type of service or resource */
|
|
49
|
+
type: string;
|
|
50
|
+
url: string;
|
|
51
|
+
params?: string;
|
|
52
|
+
scheme?: string;
|
|
53
|
+
};
|
|
45
54
|
|
|
46
55
|
export type CSWServiceProps = DataSourceProps & {
|
|
47
56
|
url: string;
|
|
48
57
|
};
|
|
49
58
|
|
|
50
59
|
/**
|
|
51
|
-
* The CSWService class
|
|
60
|
+
* The CSWService class
|
|
52
61
|
* - provides type safe methods to form URLs to a CSW service
|
|
53
62
|
* - provides type safe methods to query and parse results (and errors) from a CSW service
|
|
54
|
-
* - implements the ImageService interface
|
|
55
63
|
* @note Only the URL parameter conversion is supported. XML posts are not supported.
|
|
56
64
|
*/
|
|
57
65
|
export class CSWService extends DataSource<CSWServiceProps> {
|