Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/wms

Package Overview
Dependencies
Maintainers
9
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/wms - npm Package Compare versions

Comparing version 3.4.1 to 3.4.2

2

dist/es5/csw-capabilities-loader.js

@@ -11,3 +11,3 @@ "use strict";

var _parseCswCapabilities = require("./lib/parsers/csw/parse-csw-capabilities");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var CSWCapabilitiesLoader = {

@@ -14,0 +14,0 @@ id: 'csw-capabilities',

@@ -11,3 +11,3 @@ "use strict";

var _parseCswDomain = require("./lib/parsers/csw/parse-csw-domain");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var CSWDomainLoader = {

@@ -14,0 +14,0 @@ id: 'csw-domain',

@@ -11,3 +11,3 @@ "use strict";

var _parseCswRecords = require("./lib/parsers/csw/parse-csw-records");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var CSWRecordsLoader = {

@@ -14,0 +14,0 @@ id: 'csw-records',

@@ -11,3 +11,3 @@ "use strict";

var _parseGml = require("./lib/parsers/gml/parse-gml");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var GMLLoader = {

@@ -14,0 +14,0 @@ name: 'GML',

@@ -14,3 +14,3 @@ "use strict";

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; }
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var LERCLoader = {

@@ -17,0 +17,0 @@ id: 'lerc',

@@ -115,4 +115,4 @@ "use strict";

title: String((xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Title) || ''),
name: String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name),
abstract: String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Abstract),
name: (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name) && String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name),
abstract: (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name) && String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Abstract),
keywords: (0, _parseXmlHelpers.getXMLStringArray)((_xmlLayer$KeywordList = xmlLayer.KeywordList) === null || _xmlLayer$KeywordList === void 0 ? void 0 : _xmlLayer$KeywordList.Keyword)

@@ -249,11 +249,14 @@ };

function addInheritedLayerProps(layer, parent) {
if (parent && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
if (parent !== null && parent !== void 0 && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
layer.geographicBoundingBox = (0, _toConsumableArray2.default)(parent.geographicBoundingBox);
}
if (parent && parent.crs && !layer.crs) {
if (parent !== null && parent !== void 0 && parent.crs && !layer.crs) {
layer.crs = (0, _toConsumableArray2.default)(parent.crs);
}
if (parent && parent.boundingBoxes && !layer.boundingBoxes) {
if (parent !== null && parent !== void 0 && parent.boundingBoxes && !layer.boundingBoxes) {
layer.boundingBoxes = (0, _toConsumableArray2.default)(parent.boundingBoxes);
}
if (parent !== null && parent !== void 0 && parent.dimensions && !layer.dimensions) {
layer.dimensions = (0, _toConsumableArray2.default)(parent.dimensions);
}
var _iterator5 = _createForOfIteratorHelper(layer.layers || []),

@@ -260,0 +263,0 @@ _step5;

@@ -9,5 +9,6 @@ "use strict";

function parseWMSLayerDescription(text, options) {
var parsedXML = _xml.XMLLoader.parseTextSync(text, options);
var _XMLLoader$parseTextS;
var parsedXML = (_XMLLoader$parseTextS = _xml.XMLLoader.parseTextSync) === null || _XMLLoader$parseTextS === void 0 ? void 0 : _XMLLoader$parseTextS.call(_xml.XMLLoader, text, options);
return parsedXML;
}
//# sourceMappingURL=parse-wms-layer-description.js.map

@@ -11,3 +11,3 @@ "use strict";

var _parseWcsCapabilities = require("./lib/wcs/parse-wcs-capabilities");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var WCSCapabilitiesLoader = {

@@ -14,0 +14,0 @@ id: 'wcs-capabilities',

@@ -11,3 +11,3 @@ "use strict";

var _parseWfsCapabilities = require("./lib/wfs/parse-wfs-capabilities");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var WFSCapabilitiesLoader = {

@@ -14,0 +14,0 @@ id: 'wfs-capabilities',

@@ -11,3 +11,3 @@ "use strict";

var _parseWmtsCapabilities = require("./lib/wmts/parse-wmts-capabilities");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var WMTSCapabilitiesLoader = {

@@ -14,0 +14,0 @@ id: 'wmts-capabilities',

@@ -11,3 +11,3 @@ "use strict";

var _parseWmsCapabilities = require("./lib/parsers/wms/parse-wms-capabilities");
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var WMSCapabilitiesLoader = {

@@ -14,0 +14,0 @@ id: 'wms-capabilities',

@@ -14,3 +14,3 @@ "use strict";

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; }
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
var VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
var WMSErrorLoader = {

@@ -17,0 +17,0 @@ id: 'wms-error',

import { parseCSWCapabilities } from './lib/parsers/csw/parse-csw-capabilities';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const CSWCapabilitiesLoader = {

@@ -4,0 +4,0 @@ id: 'csw-capabilities',

import { parseCSWDomain } from './lib/parsers/csw/parse-csw-domain';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const CSWDomainLoader = {

@@ -4,0 +4,0 @@ id: 'csw-domain',

import { parseCSWRecords } from './lib/parsers/csw/parse-csw-records';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const CSWRecordsLoader = {

@@ -4,0 +4,0 @@ id: 'csw-records',

import { parseGML } from './lib/parsers/gml/parse-gml';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const GMLLoader = {

@@ -4,0 +4,0 @@ name: 'GML',

import * as Lerc from 'lerc';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const LERCLoader = {

@@ -4,0 +4,0 @@ id: 'lerc',

@@ -71,4 +71,4 @@ import { XMLLoader } from '@loaders.gl/xml';

title: String((xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Title) || ''),
name: String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name),
abstract: String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Abstract),
name: (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name) && String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name),
abstract: (xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Name) && String(xmlLayer === null || xmlLayer === void 0 ? void 0 : xmlLayer.Abstract),
keywords: getXMLStringArray((_xmlLayer$KeywordList = xmlLayer.KeywordList) === null || _xmlLayer$KeywordList === void 0 ? void 0 : _xmlLayer$KeywordList.Keyword)

@@ -195,11 +195,14 @@ };

function addInheritedLayerProps(layer, parent) {
if (parent && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
if (parent !== null && parent !== void 0 && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
layer.geographicBoundingBox = [...parent.geographicBoundingBox];
}
if (parent && parent.crs && !layer.crs) {
if (parent !== null && parent !== void 0 && parent.crs && !layer.crs) {
layer.crs = [...parent.crs];
}
if (parent && parent.boundingBoxes && !layer.boundingBoxes) {
if (parent !== null && parent !== void 0 && parent.boundingBoxes && !layer.boundingBoxes) {
layer.boundingBoxes = [...parent.boundingBoxes];
}
if (parent !== null && parent !== void 0 && parent.dimensions && !layer.dimensions) {
layer.dimensions = [...parent.dimensions];
}
for (const subLayer of layer.layers || []) {

@@ -206,0 +209,0 @@ addInheritedLayerProps(subLayer, layer);

import { XMLLoader } from '@loaders.gl/xml';
export function parseWMSLayerDescription(text, options) {
const parsedXML = XMLLoader.parseTextSync(text, options);
var _XMLLoader$parseTextS;
const parsedXML = (_XMLLoader$parseTextS = XMLLoader.parseTextSync) === null || _XMLLoader$parseTextS === void 0 ? void 0 : _XMLLoader$parseTextS.call(XMLLoader, text, options);
return parsedXML;
}
//# sourceMappingURL=parse-wms-layer-description.js.map
import { parseWCSCapabilities } from './lib/wcs/parse-wcs-capabilities';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const WCSCapabilitiesLoader = {

@@ -4,0 +4,0 @@ id: 'wcs-capabilities',

import { parseWFSCapabilities } from './lib/wfs/parse-wfs-capabilities';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const WFSCapabilitiesLoader = {

@@ -4,0 +4,0 @@ id: 'wfs-capabilities',

import { parseWMTSCapabilities } from './lib/wmts/parse-wmts-capabilities';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const WMTSCapabilitiesLoader = {

@@ -4,0 +4,0 @@ id: 'wmts-capabilities',

import { parseWMSCapabilities } from './lib/parsers/wms/parse-wms-capabilities';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const WMSCapabilitiesLoader = {

@@ -4,0 +4,0 @@ id: 'wms-capabilities',

import { parseWMSError } from './lib/parsers/wms/parse-wms-error';
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
const VERSION = typeof "3.4.2" !== 'undefined' ? "3.4.2" : 'latest';
export const WMSErrorLoader = {

@@ -4,0 +4,0 @@ id: 'wms-error',

@@ -9,4 +9,4 @@ export type { CSWLoaderOptions } from './csw-capabilities-loader';

export { WMSErrorLoader } from './wms-error-loader';
export type { WMSLoaderOptions } from './wms-capabilities-loader';
export type { WMSCapabilities } from './wms-capabilities-loader';
export type { WMSCapabilities, WMSLayer, WMSBoundingBox, WMSDimension } from './wms-capabilities-loader';
export type { WMSCapabilitiesLoaderOptions } from './wms-capabilities-loader';
export { WMSCapabilitiesLoader } from './wms-capabilities-loader';

@@ -34,2 +34,4 @@ export type { WMSFeatureInfo as _WMSFeatureInfo } from './wip/wms-feature-info-loader';

export { ArcGISImageServer as _ArcGISImageServer } from './lib/services/arcgis/arcgis-image-service';
/** @deprecated Use WMSCapabilitiesLoaderOptions */
export type { WMSCapabilitiesLoaderOptions as WMSLoaderOptions } from './wms-capabilities-loader';
//# sourceMappingURL=index.d.ts.map

@@ -40,5 +40,1 @@ "use strict";

Object.defineProperty(exports, "_ArcGISImageServer", { enumerable: true, get: function () { return arcgis_image_service_1.ArcGISImageServer; } });
// LERC - Limited Error Raster Compression
// TODO - restore once esbuild bundling issues have been resolved
// export type {LERCData} from './lib/lerc/lerc-types.js';
// export {LERCLoader} from './lerc-loader.js';

@@ -112,3 +112,3 @@ /** All capabilities of a WMS service - response to a WMS `GetCapabilities` data structure extracted from XML */

};
export type parseWMSCapabilitiesOptions = {
export type ParseWMSCapabilitiesOptions = {
/** Add inherited layer information to sub layers */

@@ -127,3 +127,3 @@ inheritedLayerProps?: boolean;

*/
export declare function parseWMSCapabilities(xmlText: string, options?: parseWMSCapabilitiesOptions): WMSCapabilities;
export declare function parseWMSCapabilities(xmlText: string, options?: ParseWMSCapabilitiesOptions): WMSCapabilities;
//# sourceMappingURL=parse-wms-capabilities.d.ts.map

@@ -92,4 +92,4 @@ "use strict";

// Name is required only if renderable
name: String(xmlLayer?.Name),
abstract: String(xmlLayer?.Abstract),
name: xmlLayer?.Name && String(xmlLayer?.Name),
abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),
keywords: (0, parse_xml_helpers_1.getXMLStringArray)(xmlLayer.KeywordList?.Keyword)

@@ -219,12 +219,14 @@ };

function addInheritedLayerProps(layer, parent) {
if (parent && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {
layer.geographicBoundingBox = [...parent.geographicBoundingBox];
}
if (parent && parent.crs && !layer.crs) {
if (parent?.crs && !layer.crs) {
layer.crs = [...parent.crs];
}
if (parent && parent.boundingBoxes && !layer.boundingBoxes) {
if (parent?.boundingBoxes && !layer.boundingBoxes) {
layer.boundingBoxes = [...parent.boundingBoxes];
}
// TODO inherit other elements
if (parent?.dimensions && !layer.dimensions) {
layer.dimensions = [...parent.dimensions];
}
for (const subLayer of layer.layers || []) {

@@ -231,0 +233,0 @@ addInheritedLayerProps(subLayer, layer);

@@ -0,1 +1,2 @@

import type { XMLLoaderOptions } from '@loaders.gl/xml';
/** Layer description - response to a WMS `DescribeLayer` request */

@@ -9,3 +10,3 @@ export type WMSLayerDescription = {

*/
export declare function parseWMSLayerDescription(text: string, options: any): WMSLayerDescription;
export declare function parseWMSLayerDescription(text: string, options?: XMLLoaderOptions): WMSLayerDescription;
//# sourceMappingURL=parse-wms-layer-description.d.ts.map

@@ -11,3 +11,3 @@ "use strict";

function parseWMSLayerDescription(text, options) {
const parsedXML = xml_1.XMLLoader.parseTextSync(text, options);
const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, options);
// TODO - implement parser

@@ -14,0 +14,0 @@ return parsedXML;

@@ -182,4 +182,2 @@ import type { ImageType } from '@loaders.gl/images';

name: string;
parse: (arrayBuffer: ArrayBuffer, options?: import("../../../wms-capabilities-loader").WMSLoaderOptions | undefined) => Promise<WMSFeatureInfo>;
parseTextSync: (text: string, options?: import("../../../wms-capabilities-loader").WMSLoaderOptions | undefined) => WMSFeatureInfo;
module: string;

@@ -189,2 +187,3 @@ version: any;

extensions: string[];
/** list of layers to query.. (GetFeatureInfo) */
mimeTypes: string[];

@@ -195,7 +194,9 @@ testText: (text: string) => boolean;

};
parse: (arrayBuffer: ArrayBuffer, options?: import("../../../wms-capabilities-loader").WMSCapabilitiesLoaderOptions | undefined) => Promise<WMSCapabilities>;
parseTextSync: (text: string, options?: import("../../../wms-capabilities-loader").WMSCapabilitiesLoaderOptions | undefined) => WMSCapabilities;
} | {
id: string;
name: string;
parse: (arrayBuffer: ArrayBuffer, options?: import("../../../wms-capabilities-loader").WMSLoaderOptions | undefined) => Promise<WMSLayerDescription>;
parseTextSync: (text: string, options?: import("../../../wms-capabilities-loader").WMSLoaderOptions | undefined) => WMSLayerDescription;
parse: (arrayBuffer: ArrayBuffer, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => Promise<WMSFeatureInfo>;
parseTextSync: (text: string, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => WMSFeatureInfo;
module: string;

@@ -205,2 +206,3 @@ version: any;

extensions: string[];
/** list of layers to query.. (GetFeatureInfo) */
mimeTypes: string[];

@@ -213,3 +215,18 @@ testText: (text: string) => boolean;

id: string;
name: string;
parse: (arrayBuffer: ArrayBuffer, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => Promise<WMSLayerDescription>;
parseTextSync: (text: string, options?: import("@loaders.gl/xml").XMLLoaderOptions | undefined) => WMSLayerDescription;
module: string;
version: any;
worker: boolean;
extensions: string[];
/** list of layers to query.. (GetFeatureInfo) */
mimeTypes: string[];
testText: (text: string) => boolean;
options: {
wms: {};
};
} | {
id: string;
module: string;
name: string;

@@ -216,0 +233,0 @@ version: any;

import type { LoaderWithParser } from '@loaders.gl/loader-utils';
import { WMSLoaderOptions } from '../wms-capabilities-loader';
import type { XMLLoaderOptions } from '@loaders.gl/xml';
import type { WMSFeatureInfo } from '../lib/parsers/wms/parse-wms-features';

@@ -11,4 +11,4 @@ export { WMSFeatureInfo };

name: string;
parse: (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) => Promise<WMSFeatureInfo>;
parseTextSync: (text: string, options?: WMSLoaderOptions) => WMSFeatureInfo;
parse: (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) => Promise<WMSFeatureInfo>;
parseTextSync: (text: string, options?: XMLLoaderOptions) => WMSFeatureInfo;
module: string;

@@ -15,0 +15,0 @@ version: any;

import type { LoaderWithParser } from '@loaders.gl/loader-utils';
import type { WMSLoaderOptions } from '../wms-capabilities-loader';
import type { XMLLoaderOptions } from '@loaders.gl/xml';
import type { WMSLayerDescription } from '../lib/parsers/wms/parse-wms-layer-description';

@@ -11,4 +11,4 @@ export { WMSLayerDescription };

name: string;
parse: (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) => Promise<WMSLayerDescription>;
parseTextSync: (text: string, options?: WMSLoaderOptions) => WMSLayerDescription;
parse: (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) => Promise<WMSLayerDescription>;
parseTextSync: (text: string, options?: XMLLoaderOptions) => WMSLayerDescription;
module: string;

@@ -15,0 +15,0 @@ version: any;

@@ -1,3 +0,4 @@

import type { LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
export type WMTSLoaderOptions = LoaderOptions & {
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
import type { XMLLoaderOptions } from '@loaders.gl/xml';
export type WMTSLoaderOptions = XMLLoaderOptions & {
wmts?: {};

@@ -4,0 +5,0 @@ };

@@ -1,9 +0,13 @@

import type { LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
import type { WMSCapabilities } from './lib/parsers/wms/parse-wms-capabilities';
export type { WMSCapabilities };
export type WMSLoaderOptions = LoaderOptions & {
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
import type { XMLLoaderOptions } from '@loaders.gl/xml';
export type { WMSCapabilities, WMSLayer, WMSBoundingBox, WMSDimension, WMSRequest, WMSExceptions } from './lib/parsers/wms/parse-wms-capabilities';
export type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {
wms?: {
/** Add inherited layer information to sub layers */
inheritedLayerProps?: boolean;
/** Whether to include "raw" XML-derived JSON */
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
includeRawData?: boolean;
/** Include the original XML document text. May contain additional information. */
includeXMLText?: boolean;
/** @deprecated Use options.includeRawData` */
raw?: boolean;

@@ -27,4 +31,4 @@ };

};
parse: (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) => Promise<WMSCapabilities>;
parseTextSync: (text: string, options?: WMSLoaderOptions) => WMSCapabilities;
parse: (arrayBuffer: ArrayBuffer, options?: WMSCapabilitiesLoaderOptions) => Promise<import("./lib/parsers/wms/parse-wms-capabilities").WMSCapabilities>;
parseTextSync: (text: string, options?: WMSCapabilitiesLoaderOptions) => import("./lib/parsers/wms/parse-wms-capabilities").WMSCapabilities;
};

@@ -31,0 +35,0 @@ declare function testXMLFile(text: string): boolean;

@@ -24,4 +24,8 @@ "use strict";

},
parse: async (arrayBuffer, options) => (0, parse_wms_capabilities_1.parseWMSCapabilities)(new TextDecoder().decode(arrayBuffer), options?.wms),
parseTextSync: (text, options) => (0, parse_wms_capabilities_1.parseWMSCapabilities)(text, options?.wms)
parse: async (arrayBuffer, options) =>
// TODO pass in XML options
(0, parse_wms_capabilities_1.parseWMSCapabilities)(new TextDecoder().decode(arrayBuffer), options?.wms),
parseTextSync: (text, options) =>
// TODO pass in XML options
(0, parse_wms_capabilities_1.parseWMSCapabilities)(text, options?.wms)
};

@@ -28,0 +32,0 @@ function testXMLFile(text) {

{
"name": "@loaders.gl/wms",
"version": "3.4.1",
"version": "3.4.2",
"description": "Framework-independent loaders for the WMS (Web Map Service) standard",

@@ -42,6 +42,6 @@ "license": "MIT",

"@babel/runtime": "^7.3.1",
"@loaders.gl/images": "3.4.1",
"@loaders.gl/loader-utils": "3.4.1",
"@loaders.gl/schema": "3.4.1",
"@loaders.gl/xml": "3.4.1",
"@loaders.gl/images": "3.4.2",
"@loaders.gl/loader-utils": "3.4.2",
"@loaders.gl/schema": "3.4.2",
"@loaders.gl/xml": "3.4.2",
"@turf/rewind": "^5.1.5",

@@ -54,3 +54,3 @@ "deep-strict-equal": "^0.2.0",

},
"gitHead": "2c39d1032c1a8b3678a6f09507b89ffe92ca9e1b"
"gitHead": "d27459f32dcd6dd9a0addd8cab5fc627486dbea9"
}

@@ -20,5 +20,9 @@ // loaders.gl, MIT license

export type {WMSLoaderOptions} from './wms-capabilities-loader';
export type {WMSCapabilities} from './wms-capabilities-loader';
export type {
WMSCapabilities,
WMSLayer,
WMSBoundingBox,
WMSDimension
} from './wms-capabilities-loader';
export type {WMSCapabilitiesLoaderOptions} from './wms-capabilities-loader';
export {WMSCapabilitiesLoader} from './wms-capabilities-loader';

@@ -79,1 +83,4 @@

// export {LERCLoader} from './lerc-loader';
/** @deprecated Use WMSCapabilitiesLoaderOptions */
export type {WMSCapabilitiesLoaderOptions as WMSLoaderOptions} from './wms-capabilities-loader';

@@ -146,3 +146,3 @@ // loaders.gl, MIT license

export type parseWMSCapabilitiesOptions = {
export type ParseWMSCapabilitiesOptions = {
/** Add inherited layer information to sub layers */

@@ -156,3 +156,2 @@ inheritedLayerProps?: boolean;

raw?: boolean;
// xml options are passed through to xml loader

@@ -167,3 +166,3 @@ };

xmlText: string,
options?: parseWMSCapabilitiesOptions
options?: ParseWMSCapabilitiesOptions
): WMSCapabilities {

@@ -260,4 +259,4 @@ const parsedXML = XMLLoader.parseTextSync(xmlText, options);

// Name is required only if renderable
name: String(xmlLayer?.Name),
abstract: String(xmlLayer?.Abstract),
name: xmlLayer?.Name && String(xmlLayer?.Name),
abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),
keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)

@@ -413,15 +412,17 @@ };

function addInheritedLayerProps(layer: WMSLayer, parent: WMSLayer | null): void {
if (parent && parent.geographicBoundingBox && !layer.geographicBoundingBox) {
if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {
layer.geographicBoundingBox = [...parent.geographicBoundingBox];
}
if (parent && parent.crs && !layer.crs) {
if (parent?.crs && !layer.crs) {
layer.crs = [...parent.crs];
}
if (parent && parent.boundingBoxes && !layer.boundingBoxes) {
if (parent?.boundingBoxes && !layer.boundingBoxes) {
layer.boundingBoxes = [...parent.boundingBoxes];
}
// TODO inherit other elements
if (parent?.dimensions && !layer.dimensions) {
layer.dimensions = [...parent.dimensions];
}

@@ -428,0 +429,0 @@ for (const subLayer of layer.layers || []) {

// loaders.gl, MIT license
import type {XMLLoaderOptions} from '@loaders.gl/xml';
import {XMLLoader} from '@loaders.gl/xml';

@@ -14,6 +15,9 @@

*/
export function parseWMSLayerDescription(text: string, options): WMSLayerDescription {
const parsedXML = XMLLoader.parseTextSync(text, options);
export function parseWMSLayerDescription(
text: string,
options?: XMLLoaderOptions
): WMSLayerDescription {
const parsedXML = XMLLoader.parseTextSync?.(text, options);
// TODO - implement parser
return parsedXML as unknown as WMSLayerDescription;
}
// loaders.gl, MIT license
import type {LoaderWithParser} from '@loaders.gl/loader-utils';
import {WMSCapabilitiesLoader, WMSLoaderOptions} from '../wms-capabilities-loader';
import type {XMLLoaderOptions} from '@loaders.gl/xml';
import {WMSCapabilitiesLoader} from '../wms-capabilities-loader';

@@ -20,7 +21,7 @@ import type {WMSFeatureInfo} from '../lib/parsers/wms/parse-wms-features';

parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) =>
parse: async (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) =>
parseWMSFeatureInfo(new TextDecoder().decode(arrayBuffer), options),
parseTextSync: (text: string, options?: WMSLoaderOptions) => parseWMSFeatureInfo(text, options)
parseTextSync: (text: string, options?: XMLLoaderOptions) => parseWMSFeatureInfo(text, options)
};
export const _typecheckWMSFeatureInfoLoader: LoaderWithParser = WMSFeatureInfoLoader;
// loaders.gl, MIT license
import type {LoaderWithParser} from '@loaders.gl/loader-utils';
import type{WMSLoaderOptions} from '../wms-capabilities-loader';
import type {XMLLoaderOptions} from '@loaders.gl/xml';
import {WMSCapabilitiesLoader} from '../wms-capabilities-loader';

@@ -21,7 +21,7 @@

parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) =>
parse: async (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) =>
parseWMSLayerDescription(new TextDecoder().decode(arrayBuffer), options),
parseTextSync: (text: string, options?: WMSLoaderOptions) => parseWMSLayerDescription(text, options)
parseTextSync: (text: string, options?: XMLLoaderOptions) => parseWMSLayerDescription(text, options)
};
export const _typecheckWMSFeatureInfoLoader: LoaderWithParser = WMSLayerDescriptionLoader;
// loaders.gl, MIT license
import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';
import type {LoaderWithParser} from '@loaders.gl/loader-utils';
import type {XMLLoaderOptions} from '@loaders.gl/xml';
// import type {WMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';

@@ -13,3 +14,3 @@ import {parseWMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';

export type WMTSLoaderOptions = LoaderOptions & {
export type WMTSLoaderOptions = XMLLoaderOptions & {
wmts?: {};

@@ -16,0 +17,0 @@ };

// loaders.gl, MIT license
import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';
import type {WMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';
import type {LoaderWithParser} from '@loaders.gl/loader-utils';
import type {XMLLoaderOptions} from '@loaders.gl/xml';
import {parseWMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';

@@ -11,10 +11,21 @@

// Parsed data type
export type {WMSCapabilities};
// Parsed data types
export type {
WMSCapabilities,
WMSLayer,
WMSBoundingBox,
WMSDimension,
WMSRequest,
WMSExceptions
} from './lib/parsers/wms/parse-wms-capabilities';
export type WMSLoaderOptions = LoaderOptions & {
export type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {
wms?: {
/** Add inherited layer information to sub layers */
inheritedLayerProps?: boolean;
/** Whether to include "raw" XML-derived JSON */
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
includeRawData?: boolean;
/** Include the original XML document text. May contain additional information. */
includeXMLText?: boolean;
/** @deprecated Use options.includeRawData` */
raw?: boolean;

@@ -40,5 +51,7 @@ };

},
parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) =>
parse: async (arrayBuffer: ArrayBuffer, options?: WMSCapabilitiesLoaderOptions) =>
// TODO pass in XML options
parseWMSCapabilities(new TextDecoder().decode(arrayBuffer), options?.wms),
parseTextSync: (text: string, options?: WMSLoaderOptions) =>
parseTextSync: (text: string, options?: WMSCapabilitiesLoaderOptions) =>
// TODO pass in XML options
parseWMSCapabilities(text, options?.wms)

@@ -45,0 +58,0 @@ };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc