@loaders.gl/wms 3.4.1 → 3.4.3
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 +9 -6
- 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/sources/image-source.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/sources/image-source.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/wms-service.d.ts +21 -4
- package/dist/lib/services/ogc/wms-service.d.ts.map +1 -1
- package/dist/lib/sources/image-source.d.ts +12 -3
- package/dist/lib/sources/image-source.d.ts.map +1 -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/sources/image-source.ts +13 -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
package/dist/dist.min.js
CHANGED
|
@@ -2204,8 +2204,8 @@
|
|
|
2204
2204
|
function extractLayer(xmlLayer) {
|
|
2205
2205
|
const layer = {
|
|
2206
2206
|
title: String(xmlLayer?.Title || ""),
|
|
2207
|
-
name: String(xmlLayer?.Name),
|
|
2208
|
-
abstract: String(xmlLayer?.Abstract),
|
|
2207
|
+
name: xmlLayer?.Name && String(xmlLayer?.Name),
|
|
2208
|
+
abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),
|
|
2209
2209
|
keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)
|
|
2210
2210
|
};
|
|
2211
2211
|
const crs = xmlLayer?.CRS || xmlLayer?.SRS;
|
|
@@ -2314,15 +2314,18 @@
|
|
|
2314
2314
|
return dimension;
|
|
2315
2315
|
}
|
|
2316
2316
|
function addInheritedLayerProps(layer, parent) {
|
|
2317
|
-
if (parent
|
|
2317
|
+
if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {
|
|
2318
2318
|
layer.geographicBoundingBox = [...parent.geographicBoundingBox];
|
|
2319
2319
|
}
|
|
2320
|
-
if (parent
|
|
2320
|
+
if (parent?.crs && !layer.crs) {
|
|
2321
2321
|
layer.crs = [...parent.crs];
|
|
2322
2322
|
}
|
|
2323
|
-
if (parent
|
|
2323
|
+
if (parent?.boundingBoxes && !layer.boundingBoxes) {
|
|
2324
2324
|
layer.boundingBoxes = [...parent.boundingBoxes];
|
|
2325
2325
|
}
|
|
2326
|
+
if (parent?.dimensions && !layer.dimensions) {
|
|
2327
|
+
layer.dimensions = [...parent.dimensions];
|
|
2328
|
+
}
|
|
2326
2329
|
for (const subLayer of layer.layers || []) {
|
|
2327
2330
|
addInheritedLayerProps(subLayer, layer);
|
|
2328
2331
|
}
|
|
@@ -2402,7 +2405,7 @@
|
|
|
2402
2405
|
|
|
2403
2406
|
// src/lib/parsers/wms/parse-wms-layer-description.ts
|
|
2404
2407
|
function parseWMSLayerDescription(text, options) {
|
|
2405
|
-
const parsedXML = XMLLoader.parseTextSync(text, options);
|
|
2408
|
+
const parsedXML = XMLLoader.parseTextSync?.(text, options);
|
|
2406
2409
|
return parsedXML;
|
|
2407
2410
|
}
|
|
2408
2411
|
var init_parse_wms_layer_description = __esm({
|
|
@@ -8,7 +8,7 @@ exports._typecheckCSWCapabilitiesLoader = exports.CSWCapabilitiesLoader = void 0
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseCswCapabilities = require("./lib/parsers/csw/parse-csw-capabilities");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var CSWCapabilitiesLoader = {
|
|
13
13
|
id: 'csw-capabilities',
|
|
14
14
|
name: 'CSW Capabilities',
|
|
@@ -8,7 +8,7 @@ exports._typecheckCSWDomainLoader = exports.CSWDomainLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseCswDomain = require("./lib/parsers/csw/parse-csw-domain");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var CSWDomainLoader = {
|
|
13
13
|
id: 'csw-domain',
|
|
14
14
|
name: 'CSW Domain',
|
|
@@ -8,7 +8,7 @@ exports.CSWRecordsLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseCswRecords = require("./lib/parsers/csw/parse-csw-records");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var CSWRecordsLoader = {
|
|
13
13
|
id: 'csw-records',
|
|
14
14
|
name: 'CSW Domain',
|
package/dist/es5/gml-loader.js
CHANGED
|
@@ -8,7 +8,7 @@ exports._typecheckGMLLoader = exports.GMLLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseGml = require("./lib/parsers/gml/parse-gml");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var GMLLoader = {
|
|
13
13
|
name: 'GML',
|
|
14
14
|
id: 'gml',
|
package/dist/es5/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_cswCapabilitiesLoader","require","_cswDomainLoader","_cswRecordsLoader","_wmsErrorLoader","_wmsCapabilitiesLoader","_wmsFeatureInfoLoader","_wmsLayerDescriptionLoader","_wfsCapabilitiesLoader","_gmlLoader","_imageSource","_createImageSource","_imageService","_cswService","_wmsService","_arcgisServer","_arcgisImageService"],"sources":["../../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// CSW - Catalog Service for the Web\n\nexport type {CSWLoaderOptions} from './csw-capabilities-loader';\n\nexport type {CSWCapabilities} from './csw-capabilities-loader';\nexport {CSWCapabilitiesLoader} from './csw-capabilities-loader';\n\nexport type {CSWDomain} from './csw-domain-loader';\nexport {CSWDomainLoader} from './csw-domain-loader';\n\nexport type {CSWRecords} from './csw-records-loader';\nexport {CSWRecordsLoader} from './csw-records-loader';\n\n// WMS - Web Map Service\n\nexport {WMSErrorLoader} from './wms-error-loader';\n\nexport type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["_cswCapabilitiesLoader","require","_cswDomainLoader","_cswRecordsLoader","_wmsErrorLoader","_wmsCapabilitiesLoader","_wmsFeatureInfoLoader","_wmsLayerDescriptionLoader","_wfsCapabilitiesLoader","_gmlLoader","_imageSource","_createImageSource","_imageService","_cswService","_wmsService","_arcgisServer","_arcgisImageService"],"sources":["../../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// CSW - Catalog Service for the Web\n\nexport type {CSWLoaderOptions} from './csw-capabilities-loader';\n\nexport type {CSWCapabilities} from './csw-capabilities-loader';\nexport {CSWCapabilitiesLoader} from './csw-capabilities-loader';\n\nexport type {CSWDomain} from './csw-domain-loader';\nexport {CSWDomainLoader} from './csw-domain-loader';\n\nexport type {CSWRecords} from './csw-records-loader';\nexport {CSWRecordsLoader} from './csw-records-loader';\n\n// WMS - Web Map Service\n\nexport {WMSErrorLoader} from './wms-error-loader';\n\nexport type {\n WMSCapabilities,\n WMSLayer,\n WMSBoundingBox,\n WMSDimension\n} from './wms-capabilities-loader';\nexport type {WMSCapabilitiesLoaderOptions} from './wms-capabilities-loader';\nexport {WMSCapabilitiesLoader} from './wms-capabilities-loader';\n\nexport type {WMSFeatureInfo as _WMSFeatureInfo} from './wip/wms-feature-info-loader';\nexport {WMSFeatureInfoLoader as _WMSFeatureInfoLoader} from './wip/wms-feature-info-loader';\n\nexport type {WMSLayerDescription as _WMSLayerDescription} from './wip/wms-layer-description-loader';\nexport {WMSLayerDescriptionLoader as _WMSLayerDescriptionLoader} from './wip/wms-layer-description-loader';\n\n// WMTS - Web Map Tile Service\n\n// export type {WMTSLoaderOptions as _WMTSLoaderOptions} from './wip/wmts-capabilities-loader';\n// export type {WMTSCapabilities as _WMTSCapabilities} from './wip/wmts-capabilities-loader';\n// export {WMTSCapabilitiesLoader as _WMTSCapabilitiesLoader} from './wip/wmts-capabilities-loader';\n\n// WFS - Web Feature Service\n\nexport type {WFSLoaderOptions as _WFSLoaderOptions} from './wip/wfs-capabilities-loader';\n\nexport type {WFSCapabilities as _WFSCapabilities} from './wip/wfs-capabilities-loader';\nexport {WFSCapabilitiesLoader as _WFSCapabilitiesLoader} from './wip/wfs-capabilities-loader';\n\n// GML - Geographic Markup Language\n\nexport type {GeoJSON as _GeoJSON} from '@loaders.gl/schema';\nexport type {GMLLoaderOptions as _GMLLoaderOptions} from './gml-loader';\nexport {GMLLoader as _GMLLoader} from './gml-loader';\n\n// EXPERIMENTAL: DATA SOURCES\n\nexport type {ImageType} from '@loaders.gl/images';\nexport type {ImageSourceProps, ImageSourceMetadata} from './lib/sources/image-source';\nexport {ImageSource} from './lib/sources/image-source';\n\nexport type {ImageServiceType} from './lib/create-image-source';\nexport {createImageSource} from './lib/create-image-source';\n\n// Generic (Template URL) Services\n\nexport type {ImageServiceProps} from './lib/services/generic/image-service';\nexport {ImageService} from './lib/services/generic/image-service';\n\n// OGC Services\n\nexport {CSWService} from './lib/services/ogc/csw-service';\nexport {WMSService} from './lib/services/ogc/wms-service';\n\n// ArcGIS Services\n\nexport {getArcGISServices as _getArcGISServices} from './lib/services/arcgis/arcgis-server';\nexport {ArcGISImageServer as _ArcGISImageServer} from './lib/services/arcgis/arcgis-image-service';\n\n// LERC - Limited Error Raster Compression\n// TODO - restore once esbuild bundling issues have been resolved\n// export type {LERCData} from './lib/lerc/lerc-types';\n// export {LERCLoader} from './lerc-loader';\n\n/** @deprecated Use WMSCapabilitiesLoaderOptions */\nexport type {WMSCapabilitiesLoaderOptions as WMSLoaderOptions} from './wms-capabilities-loader';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,sBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAD,OAAA;AAGA,IAAAE,iBAAA,GAAAF,OAAA;AAIA,IAAAG,eAAA,GAAAH,OAAA;AASA,IAAAI,sBAAA,GAAAJ,OAAA;AAGA,IAAAK,qBAAA,GAAAL,OAAA;AAGA,IAAAM,0BAAA,GAAAN,OAAA;AAaA,IAAAO,sBAAA,GAAAP,OAAA;AAMA,IAAAQ,UAAA,GAAAR,OAAA;AAMA,IAAAS,YAAA,GAAAT,OAAA;AAGA,IAAAU,kBAAA,GAAAV,OAAA;AAKA,IAAAW,aAAA,GAAAX,OAAA;AAIA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AAIA,IAAAc,aAAA,GAAAd,OAAA;AACA,IAAAe,mBAAA,GAAAf,OAAA"}
|
package/dist/es5/lerc-loader.js
CHANGED
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
var Lerc = _interopRequireWildcard(require("lerc"));
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
var VERSION = typeof "3.4.
|
|
14
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
15
15
|
var LERCLoader = {
|
|
16
16
|
id: 'lerc',
|
|
17
17
|
name: 'LERC',
|
|
@@ -112,8 +112,8 @@ function extractLayer(xmlLayer) {
|
|
|
112
112
|
var _xmlLayer$KeywordList;
|
|
113
113
|
var layer = {
|
|
114
114
|
title: String((xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Title) || ''),
|
|
115
|
-
name: String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name),
|
|
116
|
-
abstract: String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Abstract),
|
|
115
|
+
name: (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name) && String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name),
|
|
116
|
+
abstract: (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name) && String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Abstract),
|
|
117
117
|
keywords: (0, _parseXmlHelpers.getXMLStringArray)((_xmlLayer$KeywordList = xmlLayer.KeywordList) === null || _xmlLayer$KeywordList === void 0 ? void 0 : _xmlLayer$KeywordList.Keyword)
|
|
118
118
|
};
|
|
119
119
|
var crs = (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.CRS) || (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.SRS);
|
|
@@ -245,15 +245,18 @@ function extractDimension(xmlDimension) {
|
|
|
245
245
|
return dimension;
|
|
246
246
|
}
|
|
247
247
|
function addInheritedLayerProps(layer, parent) {
|
|
248
|
-
if (parent && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
|
|
248
|
+
if (parent !== null && parent !== void 0 && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
|
|
249
249
|
layer.geographicBoundingBox = (0, _toConsumableArray2.default)(parent.geographicBoundingBox);
|
|
250
250
|
}
|
|
251
|
-
if (parent && parent.crs && !layer.crs) {
|
|
251
|
+
if (parent !== null && parent !== void 0 && parent.crs && !layer.crs) {
|
|
252
252
|
layer.crs = (0, _toConsumableArray2.default)(parent.crs);
|
|
253
253
|
}
|
|
254
|
-
if (parent && parent.boundingBoxes && !layer.boundingBoxes) {
|
|
254
|
+
if (parent !== null && parent !== void 0 && parent.boundingBoxes && !layer.boundingBoxes) {
|
|
255
255
|
layer.boundingBoxes = (0, _toConsumableArray2.default)(parent.boundingBoxes);
|
|
256
256
|
}
|
|
257
|
+
if (parent !== null && parent !== void 0 && parent.dimensions && !layer.dimensions) {
|
|
258
|
+
layer.dimensions = (0, _toConsumableArray2.default)(parent.dimensions);
|
|
259
|
+
}
|
|
257
260
|
var _iterator5 = _createForOfIteratorHelper(layer.layers || []),
|
|
258
261
|
_step5;
|
|
259
262
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-capabilities.js","names":["_xml","require","_parseXmlHelpers","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","parseWMSCapabilities","xmlText","options","parsedXML","XMLLoader","parseTextSync","xmlCapabilities","WMT_MS_Capabilities","WMS_Capabilities","capabilities","extractCapabilities","inheritedLayerProps","_iterator","layers","_step","layer","addInheritedLayerProps","includeRawData","raw","includeXMLText","xml","_xml$Service","_xml$Service2","_xml$Service3","_xml$Service4","_xml$Service5","_xml$Service6","_xml$Service6$Keyword","_xml$Service7","_xml$Service8","_xml$Service9","_xml$Service10","_xml$Service11","_xml$Service12","_xml$Service13","_xml$Capability","_xml$Capability2","version","String","Service","Name","title","Title","undefined","abstract","Abstract","keywords","getXMLStringArray","KeywordList","Keyword","fees","Fees","JSON","stringify","accessConstraints","AccessConstraints","layerLimit","getXMLInteger","LayerLimit","maxWidth","maxHeight","requests","extractRequests","Capability","Request","exceptions","extractExceptions","Exception","xmlLayers","getXMLArray","Layer","_iterator2","_step2","xmlSubLayer","push","extractLayer","_i","_Object$entries","entries","_Object$entries$_i","_slicedToArray2","default","key","xmlRequests","_iterator3","_step3","_step3$value","xmlRequest","mimeTypes","Format","xmlException","xmlExceptionFormats","xmlLayer","_xmlLayer$KeywordList","crs","CRS","SRS","every","_","geographicBoundingBox","EX_GeographicBoundingBox","extractEXBoundingBox","LatLonBoundingBox","extractLatLonBoundingBox","boundingBoxes","BoundingBox","extractWMSBoundingBoxes","xmlDimensions","Dimension","dimensions","map","extractDimension","opaque","getXMLBoolean","cascaded","queryable","_iterator4","_step4","_i2","_Object$entries2","_Object$entries2$_i","xmlBoundingBox","w","westBoundLongitude","northBoundLatitude","eastBoundLongitude","southBoundLatitude","minx","miny","maxx","maxy","xmlBoundingBoxes","xmlBoxes","xmlBox","extractWMSBoundingBox","resx","resy","boundingBox","getXMLFloat","xResolution","yResolution","xmlDimension","units","extent","dimension","unitSymbol","defaultValue","multipleValues","nearestValue","current","parent","_toConsumableArray2","_iterator5","_step5","subLayer"],"sources":["../../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {XMLLoader} from '@loaders.gl/xml';\nimport {\n getXMLArray,\n getXMLStringArray,\n getXMLInteger,\n getXMLFloat,\n getXMLBoolean\n} from '../xml/parse-xml-helpers';\n\n/** All capabilities of a WMS service - response to a WMS `GetCapabilities` data structure extracted from XML */\nexport type WMSCapabilities = {\n /** Version of the WMS service */\n version?: string; // '1.3.0' | '1.1.1' | '1.1.0' | '1.0.0'\n /** A short name for the service */\n name: string;\n /** A human readable name for the service */\n title?: string;\n /** A more extensive description of the service */\n abstract?: string;\n /** A set of keywords e.g. for searching services */\n keywords: string[];\n /** A field of unspecified format, if present describes any access constraints required to use the service. */\n accessConstraints?: string;\n /** A field of unspecified format, if present describes any fees associated with the use of the service */\n fees?: string;\n /** If present, the max number of layers that can be rendered by the service */\n layerLimit?: number;\n /** If present, the widest image that can be rendered by the service */\n maxWidth?: number;\n /** If present, the tallest image that can be rendered by the service */\n maxHeight?: number;\n /** Hierarchical list of layers. */\n layers: WMSLayer[];\n /** A map with information about supported WMS requests. If a record is present, the request is supported by the service */\n requests: Record<string, WMSRequest>;\n /** Information about any exceptions that the service will report (HTTP status != 2xx) */\n exceptions?: WMSExceptions;\n /** Only if `options.raw`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */\n raw?: Record<string, unknown>;\n /** Only if `options.xml`, the unparsed XML string can be requested */\n xml?: string;\n};\n\n/**\n * Metadata about a layer\n * Layers inherit many properties from their parent layers, see description of individual props for details.\n * @see https://www.ogc.org/standard/wms/ 7.2.4.6\n */\nexport type WMSLayer = {\n /** The title is a human readable name. It is mandatory on each layer. Not inherited. */\n title: string;\n /** A layer is renderable if it has a name. A named parent layer will render all its sublayers. Not inherited. */\n name?: string;\n /** A narrative description of the map layer. */\n abstract?: string;\n /** A set of keywords e.g. for searching layers */\n keywords: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. Defined or inherited. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Supported CRS. Either defined or inherited. */\n crs?: string[];\n /** Bounding boxes in specific CRS:es */\n boundingBoxes?: WMSBoundingBox[];\n\n // minScale: number;\n // maxScale: number;\n // dimensions: ?? 7.2.4.6.10\n // MetadataURL\n // Attribution\n // Identifier and AuthorityURL\n // FeatureListURL\n // DataURL\n\n /** any extra dimension such as time */\n dimensions?: WMSDimension[];\n\n /** Whether queries can be performed on the layer */\n queryable?: boolean;\n /** `false` if layer has significant no-data areas that the client can display as transparent. */\n opaque?: boolean;\n /** WMS cascading allows server to expose layers coming from other WMS servers as if they were local layers */\n cascaded?: boolean;\n // noSubsets: boolean\n // fixedWith: number\n // fixedHeight: number\n\n /** A list of styles. @note not yet supported by WMSCapabilitiesLoader */\n styles?: unknown[];\n\n /** Sublayers - these inherit crs and boundingBox) if not overridden) */\n layers?: WMSLayer[];\n};\n\n/**\n * A bounding box specifies the coordinate range for data in the layer.\n * No data is available outside the bounding box.\n */\nexport type WMSBoundingBox = {\n /** CRS indicates the Layer CRS that applies to this bounding box. */\n crs: string;\n /** `[[w, s], [e, n]]`, indicates the limits of the bounding box using the axis units and order of the specified CRS. */\n boundingBox: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Spatial horizontal resolution of data in same units as bounding box */\n xResolution?: number;\n /** Spatial vertical resolution of data in same units as bounding box */\n yResolution?: number;\n};\n\n/**\n * An optional dimension that can be queried using the `name=...` parameter\n * Note that layers that have at least one dimension without `default` value\n * become unrenderable unless the dimension value is supplied to GetMap requests.\n */\nexport type WMSDimension = {\n /** name of dimension, becomes a valid parameter key for this layer */\n name: string;\n /** Textual units for this dimensional axis */\n units: string;\n /** Unit symbol for this dimensional axis */\n unitSymbol?: string;\n /** Default value if no value is supplied. If dimension lacks defaultValue, requests fail if no value is supplied */\n defaultValue?: string;\n /** Can multiple values of the dimension be requested? */\n multipleValues?: boolean;\n /* Will nearest values will be substituted when out of range, if false exact values are required */\n nearestValue?: boolean;\n /** A special value \"current\" is supported, typically for time dimension */\n current?: boolean;\n /** Text content indicating available values for dimension */\n extent: string;\n};\n\n/** Metadata about a supported WMS request */\nexport type WMSRequest = {\n /** MIMEtypes that can be returned by this request. */\n mimeTypes: string[];\n};\n\nexport type WMSExceptions = {\n /** MIME types for exception response payloads. */\n mimeTypes: string[];\n};\n\nexport type parseWMSCapabilitiesOptions = {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Include the \"raw\" JSON (parsed but untyped, unprocessed XML). May contain additional fields */\n includeRawData?: boolean;\n /** Include the original XML document text. May contain additional information. */\n includeXMLText?: boolean;\n /** @deprecated Use includeRawData` */\n raw?: boolean;\n\n // xml options are passed through to xml loader\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetCapabilities` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSCapabilities(\n xmlText: string,\n options?: parseWMSCapabilitiesOptions\n): WMSCapabilities {\n const parsedXML = XMLLoader.parseTextSync(xmlText, options);\n const xmlCapabilities: any =\n parsedXML.WMT_MS_Capabilities || parsedXML.WMS_Capabilities || parsedXML;\n const capabilities = extractCapabilities(xmlCapabilities);\n // In case the processed, normalized capabilities do not contain everything,\n // the user can get the parsed XML structure.\n if (options?.inheritedLayerProps) {\n // Traverse layers and inject missing props from parents\n for (const layer of capabilities.layers) {\n addInheritedLayerProps(layer, null);\n }\n // Not yet implemented\n }\n\n if (options?.includeRawData || options?.raw) {\n capabilities.raw = xmlCapabilities;\n }\n\n if (options?.includeXMLText) {\n capabilities.xml = xmlText;\n }\n\n return capabilities;\n}\n\n/** Extract typed capability data from XML */\nfunction extractCapabilities(xml: any): WMSCapabilities {\n const capabilities: WMSCapabilities = {\n version: String(xml.version || ''),\n name: String(xml.Service?.Name || 'unnamed'),\n title: xml.Service?.Title ? String(xml.Service?.Title) : undefined,\n abstract: xml.Service?.Abstract ? String(xml.Service?.Abstract) : undefined,\n keywords: getXMLStringArray(xml.Service?.KeywordList?.Keyword),\n fees: xml.Service?.Fees ? JSON.stringify(xml.Service?.Fees) : undefined,\n accessConstraints: xml.Service?.AccessConstraints\n ? JSON.stringify(xml.Service?.AccessConstraints)\n : undefined,\n layerLimit: getXMLInteger(xml.Service?.LayerLimit),\n maxWidth: getXMLInteger(xml.Service?.maxWidth),\n maxHeight: getXMLInteger(xml.Service?.maxHeight),\n layers: [],\n requests: extractRequests(xml.Capability?.Request),\n exceptions: extractExceptions(xml.Exception)\n // contact field is a mess of largely irrelevant information, put it last\n // contact: xml.Service?.Contact ? JSON.stringify(xml.Service?.Contact) : undefined,\n };\n\n // LAYERS\n const xmlLayers = getXMLArray(xml.Capability?.Layer);\n for (const xmlSubLayer of xmlLayers) {\n capabilities.layers.push(extractLayer(xmlSubLayer));\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(capabilities)) {\n if (value === undefined) {\n delete capabilities[key];\n }\n }\n\n return capabilities;\n}\n\n/** Extract typed request metadata from XML requests field */\nfunction extractRequests(xmlRequests: any): Record<string, WMSRequest> {\n const requests: Record<string, WMSRequest> = {};\n for (const [name, xmlRequest] of Object.entries(xmlRequests || {}) as any) {\n const mimeTypes = getXMLStringArray(xmlRequest?.Format);\n requests[name] = {mimeTypes};\n }\n return requests;\n}\n\nfunction extractExceptions(xmlException: any): WMSExceptions | undefined {\n const xmlExceptionFormats = getXMLArray(xmlException?.Format);\n if (xmlExceptionFormats.length > 0) {\n return {\n mimeTypes: getXMLStringArray(xmlException)\n };\n }\n return undefined;\n}\n\n/** Extract request data */\n// eslint-disable-next-line complexity, max-statements\nfunction extractLayer(xmlLayer: any): WMSLayer {\n const layer: WMSLayer = {\n // All layers must have a title\n title: String(xmlLayer?.Title || ''),\n // Name is required only if renderable\n name: String(xmlLayer?.Name),\n abstract: String(xmlLayer?.Abstract),\n keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)\n };\n\n // WMS 1.3.0 changes SRS to CRS\n const crs = xmlLayer?.CRS || xmlLayer?.SRS;\n if (crs && Array.isArray(crs) && crs.every((_) => typeof _ === 'string')) {\n layer.crs = crs;\n }\n\n // v1.3.0 extract simple geographic bounding box\n let geographicBoundingBox =\n xmlLayer?.EX_GeographicBoundingBox && extractEXBoundingBox(xmlLayer?.EX_GeographicBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // v1.1.1 extract simple geographic bounding box\n geographicBoundingBox =\n xmlLayer?.LatLonBoundingBox && extractLatLonBoundingBox(xmlLayer?.LatLonBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // Extract per-CRS bounding boxes\n const boundingBoxes = xmlLayer?.BoundingBox && extractWMSBoundingBoxes(xmlLayer?.BoundingBox);\n if (boundingBoxes && boundingBoxes.length > 0) {\n layer.boundingBoxes = boundingBoxes;\n }\n\n // Extract dimensions\n const xmlDimensions = getXMLArray(xmlLayer?.Dimension);\n const dimensions = xmlDimensions.map((xml) => extractDimension(xml));\n if (dimensions.length) {\n layer.dimensions = dimensions;\n }\n\n if (xmlLayer?.opaque) {\n layer.opaque = getXMLBoolean(xmlLayer?.opaque);\n }\n if (xmlLayer?.cascaded) {\n layer.cascaded = getXMLBoolean(xmlLayer?.cascaded);\n }\n if (xmlLayer?.queryable) {\n layer.queryable = getXMLBoolean(xmlLayer?.queryable);\n }\n\n // Single layer is not represented as array in XML\n const xmlLayers = getXMLArray(xmlLayer?.Layer);\n const layers: WMSLayer[] = [];\n\n for (const xmlSubLayer of xmlLayers) {\n layers.push(extractLayer(xmlSubLayer));\n }\n\n if (layers.length > 0) {\n layer.layers = layers;\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(layer)) {\n if (value === undefined) {\n delete layer[key];\n }\n }\n\n return layer;\n}\n\n/** WMS 1.3.0 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractEXBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {\n westBoundLongitude: w,\n northBoundLatitude: n,\n eastBoundLongitude: e,\n southBoundLatitude: s\n } = xmlBoundingBox;\n return [\n [w, s],\n [e, n]\n ];\n}\n\n/** WMS 1.1.1 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractLatLonBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {minx, miny, maxx, maxy} = xmlBoundingBox;\n return [\n [minx, miny],\n [maxx, maxy]\n ];\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBoxes(xmlBoundingBoxes: any): WMSBoundingBox[] {\n const xmlBoxes = getXMLArray(xmlBoundingBoxes);\n return xmlBoxes.map((xmlBox) => extractWMSBoundingBox(xmlBox));\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBox(xmlBoundingBox: any): WMSBoundingBox {\n const {CRS, SRS, minx, miny, maxx, maxy, resx, resy} = xmlBoundingBox;\n const boundingBox: WMSBoundingBox = {\n // CRS in 1.3.0, SRS in 1.1.1\n crs: CRS || SRS,\n boundingBox: [\n [getXMLFloat(minx) as number, getXMLFloat(miny) as number],\n [getXMLFloat(maxx) as number, getXMLFloat(maxy) as number]\n ]\n };\n if (resx) {\n boundingBox.xResolution = resx;\n }\n if (resy) {\n boundingBox.yResolution = resy;\n }\n return boundingBox;\n}\n\n/**\n * Extracts optional WMS Dimension layer field\n * @param xmlDimension\n * @example <Dimension name=\"time\" units=\"ISO8601\" default=\"2018-01-01\" nearestValue=\"0\">2001-01-01/2018-01-01/P1Y</Dimension>\n * @see https://mapserver.org/ogc/wms_dimension.html\n */\nfunction extractDimension(xmlDimension: any): WMSDimension {\n const {name, units, value: extent} = xmlDimension;\n\n const dimension: WMSDimension = {name, units, extent};\n\n if (xmlDimension.unitSymbol) {\n dimension.unitSymbol = xmlDimension.unitSymbol;\n }\n if (xmlDimension.default) {\n dimension.defaultValue = xmlDimension.default;\n }\n if (xmlDimension.multipleValues) {\n dimension.multipleValues = getXMLBoolean(xmlDimension.multipleValues);\n }\n if (xmlDimension.nearestValue) {\n dimension.nearestValue = getXMLBoolean(xmlDimension.nearestValue);\n }\n if (xmlDimension.current) {\n dimension.current = getXMLBoolean(xmlDimension.current);\n }\n\n return dimension;\n}\n\n/** Traverse layers and inject missing props from parents */\n// eslint-disable-next-line complexity\nfunction addInheritedLayerProps(layer: WMSLayer, parent: WMSLayer | null): void {\n if (parent && parent.geographicBoundingBox && !layer.geographicBoundingBox) {\n layer.geographicBoundingBox = [...parent.geographicBoundingBox];\n }\n\n if (parent && parent.crs && !layer.crs) {\n layer.crs = [...parent.crs];\n }\n\n if (parent && parent.boundingBoxes && !layer.boundingBoxes) {\n layer.boundingBoxes = [...parent.boundingBoxes];\n }\n\n // TODO inherit other elements\n\n for (const subLayer of layer.layers || []) {\n addInheritedLayerProps(subLayer, layer);\n }\n}\n"],"mappings":";;;;;;;;;AAEA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAMkC,SAAAE,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,SAAA,iJAAAC,gBAAA,SAAAC,MAAA,UAAAC,GAAA,WAAAV,CAAA,WAAAA,EAAA,IAAAT,EAAA,GAAAA,EAAA,CAAAoB,IAAA,CAAAtB,CAAA,MAAAY,CAAA,WAAAA,EAAA,QAAAW,IAAA,GAAArB,EAAA,CAAAsB,IAAA,IAAAL,gBAAA,GAAAI,IAAA,CAAAV,IAAA,SAAAU,IAAA,KAAAR,CAAA,WAAAA,EAAAU,GAAA,IAAAL,MAAA,SAAAC,GAAA,GAAAI,GAAA,KAAAR,CAAA,WAAAA,EAAA,eAAAE,gBAAA,IAAAjB,EAAA,CAAAwB,MAAA,UAAAxB,EAAA,CAAAwB,M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mBAAA,CAAAtE,OAAA,EAAOqE,MAAM,CAACnD,qBAAqB,CAAC;EACjE;EAEA,IAAImD,MAAM,IAAIA,MAAM,CAACxD,GAAG,IAAI,CAAC/E,KAAK,CAAC+E,GAAG,EAAE;IACtC/E,KAAK,CAAC+E,GAAG,OAAAyD,mBAAA,CAAAtE,OAAA,EAAOqE,MAAM,CAACxD,GAAG,CAAC;EAC7B;EAEA,IAAIwD,MAAM,IAAIA,MAAM,CAAC9C,aAAa,IAAI,CAACzF,KAAK,CAACyF,aAAa,EAAE;IAC1DzF,KAAK,CAACyF,aAAa,OAAA+C,mBAAA,CAAAtE,OAAA,EAAOqE,MAAM,CAAC9C,aAAa,CAAC;EACjD;EAAC,IAAAgD,UAAA,GAAAjM,0BAAA,CAIsBwD,KAAK,CAACF,MAAM,IAAI,EAAE;IAAA4I,MAAA;EAAA;IAAzC,KAAAD,UAAA,CAAArL,CAAA,MAAAsL,MAAA,GAAAD,UAAA,CAAApL,CAAA,IAAAC,IAAA,GAA2C;MAAA,IAAhCqL,QAAQ,GAAAD,MAAA,CAAAnL,KAAA;MACjB0C,sBAAsB,CAAC0I,QAAQ,EAAE3I,KAAK,CAAC;IACzC;EAAC,SAAAlC,GAAA;IAAA2K,UAAA,CAAAjL,CAAA,CAAAM,GAAA;EAAA;IAAA2K,UAAA,CAAA/K,CAAA;EAAA;AACH"}
|
|
1
|
+
{"version":3,"file":"parse-wms-capabilities.js","names":["_xml","require","_parseXmlHelpers","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","parseWMSCapabilities","xmlText","options","parsedXML","XMLLoader","parseTextSync","xmlCapabilities","WMT_MS_Capabilities","WMS_Capabilities","capabilities","extractCapabilities","inheritedLayerProps","_iterator","layers","_step","layer","addInheritedLayerProps","includeRawData","raw","includeXMLText","xml","_xml$Service","_xml$Service2","_xml$Service3","_xml$Service4","_xml$Service5","_xml$Service6","_xml$Service6$Keyword","_xml$Service7","_xml$Service8","_xml$Service9","_xml$Service10","_xml$Service11","_xml$Service12","_xml$Service13","_xml$Capability","_xml$Capability2","version","String","Service","Name","title","Title","undefined","abstract","Abstract","keywords","getXMLStringArray","KeywordList","Keyword","fees","Fees","JSON","stringify","accessConstraints","AccessConstraints","layerLimit","getXMLInteger","LayerLimit","maxWidth","maxHeight","requests","extractRequests","Capability","Request","exceptions","extractExceptions","Exception","xmlLayers","getXMLArray","Layer","_iterator2","_step2","xmlSubLayer","push","extractLayer","_i","_Object$entries","entries","_Object$entries$_i","_slicedToArray2","default","key","xmlRequests","_iterator3","_step3","_step3$value","xmlRequest","mimeTypes","Format","xmlException","xmlExceptionFormats","xmlLayer","_xmlLayer$KeywordList","crs","CRS","SRS","every","_","geographicBoundingBox","EX_GeographicBoundingBox","extractEXBoundingBox","LatLonBoundingBox","extractLatLonBoundingBox","boundingBoxes","BoundingBox","extractWMSBoundingBoxes","xmlDimensions","Dimension","dimensions","map","extractDimension","opaque","getXMLBoolean","cascaded","queryable","_iterator4","_step4","_i2","_Object$entries2","_Object$entries2$_i","xmlBoundingBox","w","westBoundLongitude","northBoundLatitude","eastBoundLongitude","southBoundLatitude","minx","miny","maxx","maxy","xmlBoundingBoxes","xmlBoxes","xmlBox","extractWMSBoundingBox","resx","resy","boundingBox","getXMLFloat","xResolution","yResolution","xmlDimension","units","extent","dimension","unitSymbol","defaultValue","multipleValues","nearestValue","current","parent","_toConsumableArray2","_iterator5","_step5","subLayer"],"sources":["../../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {XMLLoader} from '@loaders.gl/xml';\nimport {\n getXMLArray,\n getXMLStringArray,\n getXMLInteger,\n getXMLFloat,\n getXMLBoolean\n} from '../xml/parse-xml-helpers';\n\n/** All capabilities of a WMS service - response to a WMS `GetCapabilities` data structure extracted from XML */\nexport type WMSCapabilities = {\n /** Version of the WMS service */\n version?: string; // '1.3.0' | '1.1.1' | '1.1.0' | '1.0.0'\n /** A short name for the service */\n name: string;\n /** A human readable name for the service */\n title?: string;\n /** A more extensive description of the service */\n abstract?: string;\n /** A set of keywords e.g. for searching services */\n keywords: string[];\n /** A field of unspecified format, if present describes any access constraints required to use the service. */\n accessConstraints?: string;\n /** A field of unspecified format, if present describes any fees associated with the use of the service */\n fees?: string;\n /** If present, the max number of layers that can be rendered by the service */\n layerLimit?: number;\n /** If present, the widest image that can be rendered by the service */\n maxWidth?: number;\n /** If present, the tallest image that can be rendered by the service */\n maxHeight?: number;\n /** Hierarchical list of layers. */\n layers: WMSLayer[];\n /** A map with information about supported WMS requests. If a record is present, the request is supported by the service */\n requests: Record<string, WMSRequest>;\n /** Information about any exceptions that the service will report (HTTP status != 2xx) */\n exceptions?: WMSExceptions;\n /** Only if `options.raw`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */\n raw?: Record<string, unknown>;\n /** Only if `options.xml`, the unparsed XML string can be requested */\n xml?: string;\n};\n\n/**\n * Metadata about a layer\n * Layers inherit many properties from their parent layers, see description of individual props for details.\n * @see https://www.ogc.org/standard/wms/ 7.2.4.6\n */\nexport type WMSLayer = {\n /** The title is a human readable name. It is mandatory on each layer. Not inherited. */\n title: string;\n /** A layer is renderable if it has a name. A named parent layer will render all its sublayers. Not inherited. */\n name?: string;\n /** A narrative description of the map layer. */\n abstract?: string;\n /** A set of keywords e.g. for searching layers */\n keywords: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. Defined or inherited. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Supported CRS. Either defined or inherited. */\n crs?: string[];\n /** Bounding boxes in specific CRS:es */\n boundingBoxes?: WMSBoundingBox[];\n\n // minScale: number;\n // maxScale: number;\n // dimensions: ?? 7.2.4.6.10\n // MetadataURL\n // Attribution\n // Identifier and AuthorityURL\n // FeatureListURL\n // DataURL\n\n /** any extra dimension such as time */\n dimensions?: WMSDimension[];\n\n /** Whether queries can be performed on the layer */\n queryable?: boolean;\n /** `false` if layer has significant no-data areas that the client can display as transparent. */\n opaque?: boolean;\n /** WMS cascading allows server to expose layers coming from other WMS servers as if they were local layers */\n cascaded?: boolean;\n // noSubsets: boolean\n // fixedWith: number\n // fixedHeight: number\n\n /** A list of styles. @note not yet supported by WMSCapabilitiesLoader */\n styles?: unknown[];\n\n /** Sublayers - these inherit crs and boundingBox) if not overridden) */\n layers?: WMSLayer[];\n};\n\n/**\n * A bounding box specifies the coordinate range for data in the layer.\n * No data is available outside the bounding box.\n */\nexport type WMSBoundingBox = {\n /** CRS indicates the Layer CRS that applies to this bounding box. */\n crs: string;\n /** `[[w, s], [e, n]]`, indicates the limits of the bounding box using the axis units and order of the specified CRS. */\n boundingBox: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Spatial horizontal resolution of data in same units as bounding box */\n xResolution?: number;\n /** Spatial vertical resolution of data in same units as bounding box */\n yResolution?: number;\n};\n\n/**\n * An optional dimension that can be queried using the `name=...` parameter\n * Note that layers that have at least one dimension without `default` value\n * become unrenderable unless the dimension value is supplied to GetMap requests.\n */\nexport type WMSDimension = {\n /** name of dimension, becomes a valid parameter key for this layer */\n name: string;\n /** Textual units for this dimensional axis */\n units: string;\n /** Unit symbol for this dimensional axis */\n unitSymbol?: string;\n /** Default value if no value is supplied. If dimension lacks defaultValue, requests fail if no value is supplied */\n defaultValue?: string;\n /** Can multiple values of the dimension be requested? */\n multipleValues?: boolean;\n /* Will nearest values will be substituted when out of range, if false exact values are required */\n nearestValue?: boolean;\n /** A special value \"current\" is supported, typically for time dimension */\n current?: boolean;\n /** Text content indicating available values for dimension */\n extent: string;\n};\n\n/** Metadata about a supported WMS request */\nexport type WMSRequest = {\n /** MIMEtypes that can be returned by this request. */\n mimeTypes: string[];\n};\n\nexport type WMSExceptions = {\n /** MIME types for exception response payloads. */\n mimeTypes: string[];\n};\n\nexport type ParseWMSCapabilitiesOptions = {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Include the \"raw\" JSON (parsed but untyped, unprocessed XML). May contain additional fields */\n includeRawData?: boolean;\n /** Include the original XML document text. May contain additional information. */\n includeXMLText?: boolean;\n /** @deprecated Use includeRawData` */\n raw?: boolean;\n // xml options are passed through to xml loader\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetCapabilities` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSCapabilities(\n xmlText: string,\n options?: ParseWMSCapabilitiesOptions\n): WMSCapabilities {\n const parsedXML = XMLLoader.parseTextSync(xmlText, options);\n const xmlCapabilities: any =\n parsedXML.WMT_MS_Capabilities || parsedXML.WMS_Capabilities || parsedXML;\n const capabilities = extractCapabilities(xmlCapabilities);\n // In case the processed, normalized capabilities do not contain everything,\n // the user can get the parsed XML structure.\n if (options?.inheritedLayerProps) {\n // Traverse layers and inject missing props from parents\n for (const layer of capabilities.layers) {\n addInheritedLayerProps(layer, null);\n }\n // Not yet implemented\n }\n\n if (options?.includeRawData || options?.raw) {\n capabilities.raw = xmlCapabilities;\n }\n\n if (options?.includeXMLText) {\n capabilities.xml = xmlText;\n }\n\n return capabilities;\n}\n\n/** Extract typed capability data from XML */\nfunction extractCapabilities(xml: any): WMSCapabilities {\n const capabilities: WMSCapabilities = {\n version: String(xml.version || ''),\n name: String(xml.Service?.Name || 'unnamed'),\n title: xml.Service?.Title ? String(xml.Service?.Title) : undefined,\n abstract: xml.Service?.Abstract ? String(xml.Service?.Abstract) : undefined,\n keywords: getXMLStringArray(xml.Service?.KeywordList?.Keyword),\n fees: xml.Service?.Fees ? JSON.stringify(xml.Service?.Fees) : undefined,\n accessConstraints: xml.Service?.AccessConstraints\n ? JSON.stringify(xml.Service?.AccessConstraints)\n : undefined,\n layerLimit: getXMLInteger(xml.Service?.LayerLimit),\n maxWidth: getXMLInteger(xml.Service?.maxWidth),\n maxHeight: getXMLInteger(xml.Service?.maxHeight),\n layers: [],\n requests: extractRequests(xml.Capability?.Request),\n exceptions: extractExceptions(xml.Exception)\n // contact field is a mess of largely irrelevant information, put it last\n // contact: xml.Service?.Contact ? JSON.stringify(xml.Service?.Contact) : undefined,\n };\n\n // LAYERS\n const xmlLayers = getXMLArray(xml.Capability?.Layer);\n for (const xmlSubLayer of xmlLayers) {\n capabilities.layers.push(extractLayer(xmlSubLayer));\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(capabilities)) {\n if (value === undefined) {\n delete capabilities[key];\n }\n }\n\n return capabilities;\n}\n\n/** Extract typed request metadata from XML requests field */\nfunction extractRequests(xmlRequests: any): Record<string, WMSRequest> {\n const requests: Record<string, WMSRequest> = {};\n for (const [name, xmlRequest] of Object.entries(xmlRequests || {}) as any) {\n const mimeTypes = getXMLStringArray(xmlRequest?.Format);\n requests[name] = {mimeTypes};\n }\n return requests;\n}\n\nfunction extractExceptions(xmlException: any): WMSExceptions | undefined {\n const xmlExceptionFormats = getXMLArray(xmlException?.Format);\n if (xmlExceptionFormats.length > 0) {\n return {\n mimeTypes: getXMLStringArray(xmlException)\n };\n }\n return undefined;\n}\n\n/** Extract request data */\n// eslint-disable-next-line complexity, max-statements\nfunction extractLayer(xmlLayer: any): WMSLayer {\n const layer: WMSLayer = {\n // All layers must have a title\n title: String(xmlLayer?.Title || ''),\n // Name is required only if renderable\n name: xmlLayer?.Name && String(xmlLayer?.Name),\n abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),\n keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)\n };\n\n // WMS 1.3.0 changes SRS to CRS\n const crs = xmlLayer?.CRS || xmlLayer?.SRS;\n if (crs && Array.isArray(crs) && crs.every((_) => typeof _ === 'string')) {\n layer.crs = crs;\n }\n\n // v1.3.0 extract simple geographic bounding box\n let geographicBoundingBox =\n xmlLayer?.EX_GeographicBoundingBox && extractEXBoundingBox(xmlLayer?.EX_GeographicBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // v1.1.1 extract simple geographic bounding box\n geographicBoundingBox =\n xmlLayer?.LatLonBoundingBox && extractLatLonBoundingBox(xmlLayer?.LatLonBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // Extract per-CRS bounding boxes\n const boundingBoxes = xmlLayer?.BoundingBox && extractWMSBoundingBoxes(xmlLayer?.BoundingBox);\n if (boundingBoxes && boundingBoxes.length > 0) {\n layer.boundingBoxes = boundingBoxes;\n }\n\n // Extract dimensions\n const xmlDimensions = getXMLArray(xmlLayer?.Dimension);\n const dimensions = xmlDimensions.map((xml) => extractDimension(xml));\n if (dimensions.length) {\n layer.dimensions = dimensions;\n }\n\n if (xmlLayer?.opaque) {\n layer.opaque = getXMLBoolean(xmlLayer?.opaque);\n }\n if (xmlLayer?.cascaded) {\n layer.cascaded = getXMLBoolean(xmlLayer?.cascaded);\n }\n if (xmlLayer?.queryable) {\n layer.queryable = getXMLBoolean(xmlLayer?.queryable);\n }\n\n // Single layer is not represented as array in XML\n const xmlLayers = getXMLArray(xmlLayer?.Layer);\n const layers: WMSLayer[] = [];\n\n for (const xmlSubLayer of xmlLayers) {\n layers.push(extractLayer(xmlSubLayer));\n }\n\n if (layers.length > 0) {\n layer.layers = layers;\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(layer)) {\n if (value === undefined) {\n delete layer[key];\n }\n }\n\n return layer;\n}\n\n/** WMS 1.3.0 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractEXBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {\n westBoundLongitude: w,\n northBoundLatitude: n,\n eastBoundLongitude: e,\n southBoundLatitude: s\n } = xmlBoundingBox;\n return [\n [w, s],\n [e, n]\n ];\n}\n\n/** WMS 1.1.1 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractLatLonBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {minx, miny, maxx, maxy} = xmlBoundingBox;\n return [\n [minx, miny],\n [maxx, maxy]\n ];\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBoxes(xmlBoundingBoxes: any): WMSBoundingBox[] {\n const xmlBoxes = getXMLArray(xmlBoundingBoxes);\n return xmlBoxes.map((xmlBox) => extractWMSBoundingBox(xmlBox));\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBox(xmlBoundingBox: any): WMSBoundingBox {\n const {CRS, SRS, minx, miny, maxx, maxy, resx, resy} = xmlBoundingBox;\n const boundingBox: WMSBoundingBox = {\n // CRS in 1.3.0, SRS in 1.1.1\n crs: CRS || SRS,\n boundingBox: [\n [getXMLFloat(minx) as number, getXMLFloat(miny) as number],\n [getXMLFloat(maxx) as number, getXMLFloat(maxy) as number]\n ]\n };\n if (resx) {\n boundingBox.xResolution = resx;\n }\n if (resy) {\n boundingBox.yResolution = resy;\n }\n return boundingBox;\n}\n\n/**\n * Extracts optional WMS Dimension layer field\n * @param xmlDimension\n * @example <Dimension name=\"time\" units=\"ISO8601\" default=\"2018-01-01\" nearestValue=\"0\">2001-01-01/2018-01-01/P1Y</Dimension>\n * @see https://mapserver.org/ogc/wms_dimension.html\n */\nfunction extractDimension(xmlDimension: any): WMSDimension {\n const {name, units, value: extent} = xmlDimension;\n\n const dimension: WMSDimension = {name, units, extent};\n\n if (xmlDimension.unitSymbol) {\n dimension.unitSymbol = xmlDimension.unitSymbol;\n }\n if (xmlDimension.default) {\n dimension.defaultValue = xmlDimension.default;\n }\n if (xmlDimension.multipleValues) {\n dimension.multipleValues = getXMLBoolean(xmlDimension.multipleValues);\n }\n if (xmlDimension.nearestValue) {\n dimension.nearestValue = getXMLBoolean(xmlDimension.nearestValue);\n }\n if (xmlDimension.current) {\n dimension.current = getXMLBoolean(xmlDimension.current);\n }\n\n return dimension;\n}\n\n/** Traverse layers and inject missing props from parents */\n// eslint-disable-next-line complexity\nfunction addInheritedLayerProps(layer: WMSLayer, parent: WMSLayer | null): void {\n if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {\n layer.geographicBoundingBox = [...parent.geographicBoundingBox];\n }\n\n if (parent?.crs && !layer.crs) {\n layer.crs = [...parent.crs];\n }\n\n if (parent?.boundingBoxes && !layer.boundingBoxes) {\n layer.boundingBoxes = [...parent.boundingBoxes];\n }\n\n if (parent?.dimensions && !layer.dimensions) {\n layer.dimensions = [...parent.dimensions];\n }\n\n for (const subLayer of layer.layers || []) {\n addInheritedLayerProps(subLayer, layer);\n }\n}\n"],"mappings":";;;;;;;;;AAEA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAMkC,SAAAE,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,SAAA,iJAAAC,gBAAA,SAAAC,MAAA,UAAAC,GAAA,WAAAV,CAAA,WAAAA,EAAA,IAAAT,EAAA,GAAAA,EAAA,CAAAoB,IAAA,CAAAtB,CAAA,MAAAY,CAAA,WAAAA,EAAA,QAAAW,IA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,GAA2C;MAAA,IAAhCqL,QAAQ,GAAAD,MAAA,CAAAnL,KAAA;MACjB0C,sBAAsB,CAAC0I,QAAQ,EAAE3I,KAAK,CAAC;IACzC;EAAC,SAAAlC,GAAA;IAAA2K,UAAA,CAAAjL,CAAA,CAAAM,GAAA;EAAA;IAAA2K,UAAA,CAAA/K,CAAA;EAAA;AACH"}
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.parseWMSLayerDescription = parseWMSLayerDescription;
|
|
7
7
|
var _xml = require("@loaders.gl/xml");
|
|
8
8
|
function parseWMSLayerDescription(text, options) {
|
|
9
|
-
var
|
|
9
|
+
var _XMLLoader$parseTextS;
|
|
10
|
+
var parsedXML = (_XMLLoader$parseTextS = _xml.XMLLoader.parseTextSync) === null || _XMLLoader$parseTextS === void 0 ? void 0 : _XMLLoader$parseTextS.call(_xml.XMLLoader, text, options);
|
|
10
11
|
return parsedXML;
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=parse-wms-layer-description.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-layer-description.js","names":["_xml","require","parseWMSLayerDescription","text","options","parsedXML","XMLLoader","parseTextSync"],"sources":["../../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {XMLLoader} from '@loaders.gl/xml';\n\n/** Layer description - response to a WMS `DescribeLayer` request */\nexport type WMSLayerDescription = {\n layers: {}[];\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetFeatureInfo` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSLayerDescription(text: string
|
|
1
|
+
{"version":3,"file":"parse-wms-layer-description.js","names":["_xml","require","parseWMSLayerDescription","text","options","_XMLLoader$parseTextS","parsedXML","XMLLoader","parseTextSync","call"],"sources":["../../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {XMLLoader} from '@loaders.gl/xml';\n\n/** Layer description - response to a WMS `DescribeLayer` request */\nexport type WMSLayerDescription = {\n layers: {}[];\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetFeatureInfo` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSLayerDescription(\n text: string,\n options?: XMLLoaderOptions\n): WMSLayerDescription {\n const parsedXML = XMLLoader.parseTextSync?.(text, options);\n // TODO - implement parser\n return parsedXML as unknown as WMSLayerDescription;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AAWO,SAASC,wBAAwBA,CACtCC,IAAY,EACZC,OAA0B,EACL;EAAA,IAAAC,qBAAA;EACrB,IAAMC,SAAS,IAAAD,qBAAA,GAAGE,cAAS,CAACC,aAAa,cAAAH,qBAAA,uBAAvBA,qBAAA,CAAAI,IAAA,CAAAF,cAAS,EAAiBJ,IAAI,EAAEC,OAAO,CAAC;EAE1D,OAAOE,SAAS;AAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-source.js","names":["_dataSource","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","ImageSource","_DataSource","_inherits2","_super","_classCallCheck2","_createClass2","DataSource","exports"],"sources":["../../../../src/lib/sources/image-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {ImageType} from '@loaders.gl/images';\nimport type {DataSourceProps} from './data-source';\nimport {DataSource} from './data-source';\n\n/**\n * Normalized capabilities of an Image service\n * @example\n * The WMSService will normalize the response to the WMS `GetCapabilities
|
|
1
|
+
{"version":3,"file":"image-source.js","names":["_dataSource","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","ImageSource","_DataSource","_inherits2","_super","_classCallCheck2","_createClass2","DataSource","exports"],"sources":["../../../../src/lib/sources/image-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {ImageType} from '@loaders.gl/images';\nimport type {DataSourceProps} from './data-source';\nimport {DataSource} from './data-source';\n\n/**\n * Normalized capabilities of an Image service\n * @example\n * The WMSService will normalize the response to the WMS `GetCapabilities`\n * data structure extracted from WMS XML response into an ImageSourceMetadata.\n */\nexport type ImageSourceMetadata = {\n name: string;\n title?: string;\n abstract?: string;\n keywords: string[];\n layers: ImageSourceLayer[];\n};\n\n/** Description of one data layer in the image source */\nexport type ImageSourceLayer = {\n /** Name of this layer */\n name?: string;\n /** Human readable title of this layer */\n title?: string;\n /** Coordinate systems supported by this layer */\n crs?: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Sub layers of this layer */\n layers?: ImageSourceLayer[];\n\n /** @deprecated from v3.4: non-vis.gl style bounding box. Use `.geographicBoundingBox` instead */\n boundingBox?: [number, number, number, number];\n};\n\n/** Generic parameters for requesting an image from an image source */\nexport type GetImageParameters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n /** bounding box of the requested map image */\n bbox: [number, number, number, number];\n /** pixel width of returned image */\n width: number;\n /** pixels */\n height: number;\n /** crs for the image (not the bounding box) */\n crs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\n// Attempt to break down GetImageParameters\nexport type ImageFilters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n};\n\nexport type ImageRegion = {\n /** bounding box of the requested map image */\n bbox: [number, number, number, number];\n};\n\nexport type ImageFormat = {\n /** pixel width of returned image */\n width: number;\n /** pixels */\n height: number;\n /** crs for the image (not the bounding box) */\n crs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\nexport type ImageSourceProps = DataSourceProps;\n\n/**\n * MapImageSource - data sources that allow data to be queried by (geospatial) extents\n * @note\n * - If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport abstract class ImageSource<\n PropsT extends ImageSourceProps = ImageSourceProps\n> extends DataSource<PropsT> {\n abstract getMetadata(): Promise<ImageSourceMetadata>;\n abstract getImage(parameters: GetImageParameters): Promise<ImageType>;\n}\n"],"mappings":";;;;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,OAAA;AAAyC,SAAAC,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAP,KAAA,EAAAQ,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAS,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAR,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAQ,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAAA,IAkFnBC,WAAW,aAAAC,WAAA;EAAA,IAAAC,UAAA,CAAAlB,OAAA,EAAAgB,WAAA,EAAAC,WAAA;EAAA,IAAAE,MAAA,GAAA1B,YAAA,CAAAuB,WAAA;EAAA,SAAAA,YAAA;IAAA,IAAAI,gBAAA,CAAApB,OAAA,QAAAgB,WAAA;IAAA,OAAAG,MAAA,CAAAZ,KAAA,OAAAD,SAAA;EAAA;EAAA,WAAAe,aAAA,CAAArB,OAAA,EAAAgB,WAAA;AAAA,EAEvBM,sBAAU;AAAAC,OAAA,CAAAP,WAAA,GAAAA,WAAA"}
|
|
@@ -8,7 +8,7 @@ exports._typecheckWFSCapabilitiesLoader = exports.WCSCapabilitiesLoader = void 0
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseWcsCapabilities = require("./lib/wcs/parse-wcs-capabilities");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var WCSCapabilitiesLoader = {
|
|
13
13
|
id: 'wcs-capabilities',
|
|
14
14
|
name: 'WFS Capabilities',
|
|
@@ -8,7 +8,7 @@ exports._typecheckWFSCapabilitiesLoader = exports.WFSCapabilitiesLoader = void 0
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseWfsCapabilities = require("./lib/wfs/parse-wfs-capabilities");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var WFSCapabilitiesLoader = {
|
|
13
13
|
id: 'wfs-capabilities',
|
|
14
14
|
name: 'WFS Capabilities',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-feature-info-loader.js","names":["_wmsCapabilitiesLoader","require","_parseWmsFeatures","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","WMSFeatureInfoLoader","WMSCapabilitiesLoader","id","name","parse","_parse","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parseWMSFeatureInfo","TextDecoder","decode","stop","_x","_x2","parseTextSync","text","exports","_typecheckWMSFeatureInfoLoader"],"sources":["../../../src/wip/wms-feature-info-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {WMSCapabilitiesLoader
|
|
1
|
+
{"version":3,"file":"wms-feature-info-loader.js","names":["_wmsCapabilitiesLoader","require","_parseWmsFeatures","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","WMSFeatureInfoLoader","WMSCapabilitiesLoader","id","name","parse","_parse","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parseWMSFeatureInfo","TextDecoder","decode","stop","_x","_x2","parseTextSync","text","exports","_typecheckWMSFeatureInfoLoader"],"sources":["../../../src/wip/wms-feature-info-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {WMSCapabilitiesLoader} from '../wms-capabilities-loader';\n\nimport type {WMSFeatureInfo} from '../lib/parsers/wms/parse-wms-features';\nimport {parseWMSFeatureInfo} from '../lib/parsers/wms/parse-wms-features';\n\nexport {WMSFeatureInfo};\n\n/**\n * Loader for the response to the WMS GetFeatureInfo request\n */\nexport const WMSFeatureInfoLoader = {\n ...WMSCapabilitiesLoader,\n\n id: 'wms-feature-info',\n name: 'WMS FeatureInfo',\n\n parse: async (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) =>\n parseWMSFeatureInfo(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: XMLLoaderOptions) => parseWMSFeatureInfo(text, options)\n};\n\nexport const _typecheckWMSFeatureInfoLoader: LoaderWithParser = WMSFeatureInfoLoader;\n"],"mappings":";;;;;;;;;;AAIA,IAAAA,sBAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AAA0E,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,QAAAC,gBAAA,CAAAC,OAAA,EAAAR,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,CAAAmB,yBAAA,GAAAnB,MAAA,CAAAoB,gBAAA,CAAAV,MAAA,EAAAV,MAAA,CAAAmB,yBAAA,CAAAL,MAAA,KAAAlB,OAAA,CAAAI,MAAA,CAAAc,MAAA,GAAAC,OAAA,WAAAC,GAAA,IAAAhB,MAAA,CAAAqB,cAAA,CAAAX,MAAA,EAAAM,GAAA,EAAAhB,MAAA,CAAAK,wBAAA,CAAAS,MAAA,EAAAE,GAAA,iBAAAN,MAAA;AAOnE,IAAMY,oBAAoB,GAAAb,aAAA,CAAAA,aAAA,KAC5Bc,4CAAqB;EAExBC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,iBAAiB;EAEvBC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAV,OAAA,EAAAW,YAAA,CAAAX,OAAA,CAAAY,IAAA,CAAE,SAAAC,QAAOC,WAAwB,EAAEC,OAA0B;MAAA,OAAAJ,YAAA,CAAAX,OAAA,CAAAgB,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WAChE,IAAAC,qCAAmB,EAAC,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACV,WAAW,CAAC,EAAEC,OAAO,CAAC;UAAA;UAAA;YAAA,OAAAG,QAAA,CAAAO,IAAA;QAAA;MAAA,GAAAZ,OAAA;IAAA;IAAA,SAAAL,MAAAkB,EAAA,EAAAC,GAAA;MAAA,OAAAlB,MAAA,CAAAnB,KAAA,OAAAI,SAAA;IAAA;IAAA,OAAAc,KAAA;EAAA;EACrEoB,aAAa,EAAE,SAAAA,cAACC,IAAY,EAAEd,OAA0B;IAAA,OAAK,IAAAO,qCAAmB,EAACO,IAAI,EAAEd,OAAO,CAAC;EAAA;AAAA,EAChG;AAACe,OAAA,CAAA1B,oBAAA,GAAAA,oBAAA;AAEK,IAAM2B,8BAAgD,GAAG3B,oBAAoB;AAAC0B,OAAA,CAAAC,8BAAA,GAAAA,8BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-layer-description-loader.js","names":["_wmsCapabilitiesLoader","require","_parseWmsLayerDescription","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","WMSLayerDescriptionLoader","WMSCapabilitiesLoader","id","name","parse","_parse","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parseWMSLayerDescription","TextDecoder","decode","stop","_x","_x2","parseTextSync","text","exports","_typecheckWMSFeatureInfoLoader"],"sources":["../../../src/wip/wms-layer-description-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type{
|
|
1
|
+
{"version":3,"file":"wms-layer-description-loader.js","names":["_wmsCapabilitiesLoader","require","_parseWmsLayerDescription","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","WMSLayerDescriptionLoader","WMSCapabilitiesLoader","id","name","parse","_parse","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parseWMSLayerDescription","TextDecoder","decode","stop","_x","_x2","parseTextSync","text","exports","_typecheckWMSFeatureInfoLoader"],"sources":["../../../src/wip/wms-layer-description-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {WMSCapabilitiesLoader} from '../wms-capabilities-loader';\n\nimport type {WMSLayerDescription} from '../lib/parsers/wms/parse-wms-layer-description';\nimport {parseWMSLayerDescription} from '../lib/parsers/wms/parse-wms-layer-description';\n\nexport {WMSLayerDescription};\n\n/**\n * Loader for the response to the WMS DescribeLayer request\n */\nexport const WMSLayerDescriptionLoader = {\n ...WMSCapabilitiesLoader,\n\n id: 'wms-layer-description',\n name: 'WMS DescribeLayer',\n\n parse: async (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) =>\n parseWMSLayerDescription(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: XMLLoaderOptions) => parseWMSLayerDescription(text, options)\n};\n\nexport const _typecheckWMSFeatureInfoLoader: LoaderWithParser = WMSLayerDescriptionLoader;\n"],"mappings":";;;;;;;;;;AAIA,IAAAA,sBAAA,GAAAC,OAAA;AAGA,IAAAC,yBAAA,GAAAD,OAAA;AAAwF,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,QAAAC,gBAAA,CAAAC,OAAA,EAAAR,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,CAAAmB,yBAAA,GAAAnB,MAAA,CAAAoB,gBAAA,CAAAV,MAAA,EAAAV,MAAA,CAAAmB,yBAAA,CAAAL,MAAA,KAAAlB,OAAA,CAAAI,MAAA,CAAAc,MAAA,GAAAC,OAAA,WAAAC,GAAA,IAAAhB,MAAA,CAAAqB,cAAA,CAAAX,MAAA,EAAAM,GAAA,EAAAhB,MAAA,CAAAK,wBAAA,CAAAS,MAAA,EAAAE,GAAA,iBAAAN,MAAA;AAOjF,IAAMY,yBAAyB,GAAAb,aAAA,CAAAA,aAAA,KACjCc,4CAAqB;EAExBC,EAAE,EAAE,uBAAuB;EAC3BC,IAAI,EAAE,mBAAmB;EAEzBC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAV,OAAA,EAAAW,YAAA,CAAAX,OAAA,CAAAY,IAAA,CAAE,SAAAC,QAAOC,WAAwB,EAAEC,OAA0B;MAAA,OAAAJ,YAAA,CAAAX,OAAA,CAAAgB,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WAChE,IAAAC,kDAAwB,EAAC,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACV,WAAW,CAAC,EAAEC,OAAO,CAAC;UAAA;UAAA;YAAA,OAAAG,QAAA,CAAAO,IAAA;QAAA;MAAA,GAAAZ,OAAA;IAAA;IAAA,SAAAL,MAAAkB,EAAA,EAAAC,GAAA;MAAA,OAAAlB,MAAA,CAAAnB,KAAA,OAAAI,SAAA;IAAA;IAAA,OAAAc,KAAA;EAAA;EAC1EoB,aAAa,EAAE,SAAAA,cAACC,IAAY,EAAEd,OAA0B;IAAA,OAAK,IAAAO,kDAAwB,EAACO,IAAI,EAAEd,OAAO,CAAC;EAAA;AAAA,EACrG;AAACe,OAAA,CAAA1B,yBAAA,GAAAA,yBAAA;AAEK,IAAM2B,8BAAgD,GAAG3B,yBAAyB;AAAC0B,OAAA,CAAAC,8BAAA,GAAAA,8BAAA"}
|
|
@@ -8,7 +8,7 @@ exports._typecheckWMTSCapabilitiesLoader = exports.WMTSCapabilitiesLoader = void
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseWmtsCapabilities = require("./lib/wmts/parse-wmts-capabilities");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var WMTSCapabilitiesLoader = {
|
|
13
13
|
id: 'wmts-capabilities',
|
|
14
14
|
name: 'WMTS Capabilities',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wmts-capabilities-loader.js","names":["_parseWmtsCapabilities","require","VERSION","WMTSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","wrap","_callee$","_context","prev","next","abrupt","parseWMTSCapabilities","TextDecoder","decode","stop","_x","_x2","apply","arguments","parseTextSync","text","exports","startsWith","_typecheckWMTSCapabilitiesLoader"],"sources":["../../../src/wip/wmts-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser
|
|
1
|
+
{"version":3,"file":"wmts-capabilities-loader.js","names":["_parseWmtsCapabilities","require","VERSION","WMTSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","wrap","_callee$","_context","prev","next","abrupt","parseWMTSCapabilities","TextDecoder","decode","stop","_x","_x2","apply","arguments","parseTextSync","text","exports","startsWith","_typecheckWMTSCapabilitiesLoader"],"sources":["../../../src/wip/wmts-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\n// import type {WMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';\nimport {parseWMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// export type {WMTSCapabilities};\n\nexport type WMTSLoaderOptions = XMLLoaderOptions & {\n wmts?: {};\n};\n\n/**\n * Loader for the response to the WMTS GetCapability request\n */\nexport const WMTSCapabilitiesLoader = {\n id: 'wmts-capabilities',\n name: 'WMTS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wmts_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMTSLoaderOptions) =>\n parseWMTSCapabilities(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WMTSLoaderOptions) => parseWMTSCapabilities(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWMTSCapabilitiesLoader: LoaderWithParser = WMTSCapabilitiesLoader;\n"],"mappings":";;;;;;;;;AAKA,IAAAA,sBAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAWpE,IAAMC,sBAAsB,GAAG;EACpCC,EAAE,EAAE,mBAAmB;EACvBC,IAAI,EAAE,mBAAmB;EAEzBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,8BAA8B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EAC1EC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAE,SAAAC,QAAOC,WAAwB,EAAET,OAA2B;MAAA,OAAAM,YAAA,CAAAD,OAAA,CAAAK,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WACjE,IAAAC,4CAAqB,EAAC,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACT,WAAW,CAAC,EAAET,OAAO,CAAC;UAAA;UAAA;YAAA,OAAAY,QAAA,CAAAO,IAAA;QAAA;MAAA,GAAAX,OAAA;IAAA;IAAA,SAAAN,MAAAkB,EAAA,EAAAC,GAAA;MAAA,OAAAlB,MAAA,CAAAmB,KAAA,OAAAC,SAAA;IAAA;IAAA,OAAArB,KAAA;EAAA;EACvEsB,aAAa,EAAE,SAAAA,cAACC,IAAY,EAAEzB,OAA2B;IAAA,OAAK,IAAAgB,4CAAqB,EAACS,IAAI,EAAEzB,OAAO,CAAC;EAAA;AACpG,CAAC;AAAC0B,OAAA,CAAApC,sBAAA,GAAAA,sBAAA;AAEF,SAASS,WAAWA,CAAC0B,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACE,UAAU,CAAC,OAAO,CAAC;AACjC;AAEO,IAAMC,gCAAkD,GAAGtC,sBAAsB;AAACoC,OAAA,CAAAE,gCAAA,GAAAA,gCAAA"}
|
|
@@ -8,7 +8,7 @@ exports._typecheckWMSCapabilitiesLoader = exports.WMSCapabilitiesLoader = void 0
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseWmsCapabilities = require("./lib/parsers/wms/parse-wms-capabilities");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
12
12
|
var WMSCapabilitiesLoader = {
|
|
13
13
|
id: 'wms-capabilities',
|
|
14
14
|
name: 'WMS Capabilities',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-capabilities-loader.js","names":["_parseWmsCapabilities","require","VERSION","WMSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","wrap","_callee$","_context","prev","next","abrupt","parseWMSCapabilities","TextDecoder","decode","stop","_x","_x2","apply","arguments","parseTextSync","text","exports","startsWith","_typecheckWMSCapabilitiesLoader"],"sources":["../../src/wms-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser
|
|
1
|
+
{"version":3,"file":"wms-capabilities-loader.js","names":["_parseWmsCapabilities","require","VERSION","WMSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","wrap","_callee$","_context","prev","next","abrupt","parseWMSCapabilities","TextDecoder","decode","stop","_x","_x2","apply","arguments","parseTextSync","text","exports","startsWith","_typecheckWMSCapabilitiesLoader"],"sources":["../../src/wms-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {parseWMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// Parsed data types\nexport type {\n WMSCapabilities,\n WMSLayer,\n WMSBoundingBox,\n WMSDimension,\n WMSRequest,\n WMSExceptions\n} from './lib/parsers/wms/parse-wms-capabilities';\n\nexport type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {\n wms?: {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Include the \"raw\" JSON (parsed but untyped, unprocessed XML). May contain additional fields */\n includeRawData?: boolean;\n /** Include the original XML document text. May contain additional information. */\n includeXMLText?: boolean;\n /** @deprecated Use options.includeRawData` */\n raw?: boolean;\n };\n};\n\n/**\n * Loader for the response to the WMS GetCapability request\n */\nexport const WMSCapabilitiesLoader = {\n id: 'wms-capabilities',\n name: 'WMS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wms_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMSCapabilitiesLoaderOptions) =>\n // TODO pass in XML options\n parseWMSCapabilities(new TextDecoder().decode(arrayBuffer), options?.wms),\n parseTextSync: (text: string, options?: WMSCapabilitiesLoaderOptions) =>\n // TODO pass in XML options\n parseWMSCapabilities(text, options?.wms)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWMSCapabilitiesLoader: LoaderWithParser = WMSCapabilitiesLoader;\n"],"mappings":";;;;;;;;;AAIA,IAAAA,qBAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AA4BpE,IAAMC,qBAAqB,GAAG;EACnCC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EAExBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,6BAA6B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EACzEC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAE,SAAAC,QAAOC,WAAwB,EAAET,OAAsC;MAAA,OAAAM,YAAA,CAAAD,OAAA,CAAAK,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WAE5E,IAAAC,0CAAoB,EAAC,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACT,WAAW,CAAC,EAAET,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG,CAAC;UAAA;UAAA;YAAA,OAAAW,QAAA,CAAAO,IAAA;QAAA;MAAA,GAAAX,OAAA;IAAA;IAAA,SAAAN,MAAAkB,EAAA,EAAAC,GAAA;MAAA,OAAAlB,MAAA,CAAAmB,KAAA,OAAAC,SAAA;IAAA;IAAA,OAAArB,KAAA;EAAA;EAC3EsB,aAAa,EAAE,SAAAA,cAACC,IAAY,EAAEzB,OAAsC;IAAA,OAElE,IAAAgB,0CAAoB,EAACS,IAAI,EAAEzB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG,CAAC;EAAA;AAC5C,CAAC;AAACyB,OAAA,CAAApC,qBAAA,GAAAA,qBAAA;AAEF,SAASS,WAAWA,CAAC0B,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACE,UAAU,CAAC,OAAO,CAAC;AACjC;AAEO,IAAMC,+BAAiD,GAAGtC,qBAAqB;AAACoC,OAAA,CAAAE,+BAAA,GAAAA,+BAAA"}
|
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
var _parseWmsError = require("./lib/parsers/wms/parse-wms-error");
|
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
-
var VERSION = typeof "3.4.
|
|
14
|
+
var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
15
15
|
var WMSErrorLoader = {
|
|
16
16
|
id: 'wms-error',
|
|
17
17
|
name: 'WMS Error',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseCSWCapabilities } from './lib/parsers/csw/parse-csw-capabilities';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
3
3
|
export const CSWCapabilitiesLoader = {
|
|
4
4
|
id: 'csw-capabilities',
|
|
5
5
|
name: 'CSW Capabilities',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseCSWDomain } from './lib/parsers/csw/parse-csw-domain';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
3
3
|
export const CSWDomainLoader = {
|
|
4
4
|
id: 'csw-domain',
|
|
5
5
|
name: 'CSW Domain',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseCSWRecords } from './lib/parsers/csw/parse-csw-records';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
|
|
3
3
|
export const CSWRecordsLoader = {
|
|
4
4
|
id: 'csw-records',
|
|
5
5
|
name: 'CSW Domain',
|
package/dist/esm/gml-loader.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CSWCapabilitiesLoader","CSWDomainLoader","CSWRecordsLoader","WMSErrorLoader","WMSCapabilitiesLoader","WMSFeatureInfoLoader","_WMSFeatureInfoLoader","WMSLayerDescriptionLoader","_WMSLayerDescriptionLoader","WFSCapabilitiesLoader","_WFSCapabilitiesLoader","GMLLoader","_GMLLoader","ImageSource","createImageSource","ImageService","CSWService","WMSService","getArcGISServices","_getArcGISServices","ArcGISImageServer","_ArcGISImageServer"],"sources":["../../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// CSW - Catalog Service for the Web\n\nexport type {CSWLoaderOptions} from './csw-capabilities-loader';\n\nexport type {CSWCapabilities} from './csw-capabilities-loader';\nexport {CSWCapabilitiesLoader} from './csw-capabilities-loader';\n\nexport type {CSWDomain} from './csw-domain-loader';\nexport {CSWDomainLoader} from './csw-domain-loader';\n\nexport type {CSWRecords} from './csw-records-loader';\nexport {CSWRecordsLoader} from './csw-records-loader';\n\n// WMS - Web Map Service\n\nexport {WMSErrorLoader} from './wms-error-loader';\n\nexport type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["CSWCapabilitiesLoader","CSWDomainLoader","CSWRecordsLoader","WMSErrorLoader","WMSCapabilitiesLoader","WMSFeatureInfoLoader","_WMSFeatureInfoLoader","WMSLayerDescriptionLoader","_WMSLayerDescriptionLoader","WFSCapabilitiesLoader","_WFSCapabilitiesLoader","GMLLoader","_GMLLoader","ImageSource","createImageSource","ImageService","CSWService","WMSService","getArcGISServices","_getArcGISServices","ArcGISImageServer","_ArcGISImageServer"],"sources":["../../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// CSW - Catalog Service for the Web\n\nexport type {CSWLoaderOptions} from './csw-capabilities-loader';\n\nexport type {CSWCapabilities} from './csw-capabilities-loader';\nexport {CSWCapabilitiesLoader} from './csw-capabilities-loader';\n\nexport type {CSWDomain} from './csw-domain-loader';\nexport {CSWDomainLoader} from './csw-domain-loader';\n\nexport type {CSWRecords} from './csw-records-loader';\nexport {CSWRecordsLoader} from './csw-records-loader';\n\n// WMS - Web Map Service\n\nexport {WMSErrorLoader} from './wms-error-loader';\n\nexport type {\n WMSCapabilities,\n WMSLayer,\n WMSBoundingBox,\n WMSDimension\n} from './wms-capabilities-loader';\nexport type {WMSCapabilitiesLoaderOptions} from './wms-capabilities-loader';\nexport {WMSCapabilitiesLoader} from './wms-capabilities-loader';\n\nexport type {WMSFeatureInfo as _WMSFeatureInfo} from './wip/wms-feature-info-loader';\nexport {WMSFeatureInfoLoader as _WMSFeatureInfoLoader} from './wip/wms-feature-info-loader';\n\nexport type {WMSLayerDescription as _WMSLayerDescription} from './wip/wms-layer-description-loader';\nexport {WMSLayerDescriptionLoader as _WMSLayerDescriptionLoader} from './wip/wms-layer-description-loader';\n\n// WMTS - Web Map Tile Service\n\n// export type {WMTSLoaderOptions as _WMTSLoaderOptions} from './wip/wmts-capabilities-loader';\n// export type {WMTSCapabilities as _WMTSCapabilities} from './wip/wmts-capabilities-loader';\n// export {WMTSCapabilitiesLoader as _WMTSCapabilitiesLoader} from './wip/wmts-capabilities-loader';\n\n// WFS - Web Feature Service\n\nexport type {WFSLoaderOptions as _WFSLoaderOptions} from './wip/wfs-capabilities-loader';\n\nexport type {WFSCapabilities as _WFSCapabilities} from './wip/wfs-capabilities-loader';\nexport {WFSCapabilitiesLoader as _WFSCapabilitiesLoader} from './wip/wfs-capabilities-loader';\n\n// GML - Geographic Markup Language\n\nexport type {GeoJSON as _GeoJSON} from '@loaders.gl/schema';\nexport type {GMLLoaderOptions as _GMLLoaderOptions} from './gml-loader';\nexport {GMLLoader as _GMLLoader} from './gml-loader';\n\n// EXPERIMENTAL: DATA SOURCES\n\nexport type {ImageType} from '@loaders.gl/images';\nexport type {ImageSourceProps, ImageSourceMetadata} from './lib/sources/image-source';\nexport {ImageSource} from './lib/sources/image-source';\n\nexport type {ImageServiceType} from './lib/create-image-source';\nexport {createImageSource} from './lib/create-image-source';\n\n// Generic (Template URL) Services\n\nexport type {ImageServiceProps} from './lib/services/generic/image-service';\nexport {ImageService} from './lib/services/generic/image-service';\n\n// OGC Services\n\nexport {CSWService} from './lib/services/ogc/csw-service';\nexport {WMSService} from './lib/services/ogc/wms-service';\n\n// ArcGIS Services\n\nexport {getArcGISServices as _getArcGISServices} from './lib/services/arcgis/arcgis-server';\nexport {ArcGISImageServer as _ArcGISImageServer} from './lib/services/arcgis/arcgis-image-service';\n\n// LERC - Limited Error Raster Compression\n// TODO - restore once esbuild bundling issues have been resolved\n// export type {LERCData} from './lib/lerc/lerc-types';\n// export {LERCLoader} from './lerc-loader';\n\n/** @deprecated Use WMSCapabilitiesLoaderOptions */\nexport type {WMSCapabilitiesLoaderOptions as WMSLoaderOptions} from './wms-capabilities-loader';\n"],"mappings":"AAOA,SAAQA,qBAAqB,QAAO,2BAA2B;AAG/D,SAAQC,eAAe,QAAO,qBAAqB;AAGnD,SAAQC,gBAAgB,QAAO,sBAAsB;AAIrD,SAAQC,cAAc,QAAO,oBAAoB;AASjD,SAAQC,qBAAqB,QAAO,2BAA2B;AAG/D,SAAQC,oBAAoB,IAAIC,qBAAqB,QAAO,+BAA+B;AAG3F,SAAQC,yBAAyB,IAAIC,0BAA0B,QAAO,oCAAoC;AAa1G,SAAQC,qBAAqB,IAAIC,sBAAsB,QAAO,+BAA+B;AAM7F,SAAQC,SAAS,IAAIC,UAAU,QAAO,cAAc;AAMpD,SAAQC,WAAW,QAAO,4BAA4B;AAGtD,SAAQC,iBAAiB,QAAO,2BAA2B;AAK3D,SAAQC,YAAY,QAAO,sCAAsC;AAIjE,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,UAAU,QAAO,gCAAgC;AAIzD,SAAQC,iBAAiB,IAAIC,kBAAkB,QAAO,qCAAqC;AAC3F,SAAQC,iBAAiB,IAAIC,kBAAkB,QAAO,4CAA4C"}
|
package/dist/esm/lerc-loader.js
CHANGED