@loaders.gl/wms
Version:
Framework-independent loaders for the WMS (Web Map Service) standard
32 lines • 1.22 kB
JavaScript
// loaders.gl, MIT license
import { parseWFSCapabilities } from "./lib/parsers/wfs/parse-wfs-capabilities.js";
// __VERSION__ is injected by babel-plugin-version-inline
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.4.2" !== 'undefined' ? "4.4.2" : 'latest';
/**
* Loader for the response to the WFS GetCapability request
* @deprecated Warning: this loader is still experimental and incomplete
*/
export const WFSCapabilitiesLoader = {
dataType: null,
batchType: null,
id: 'wfs-capabilities',
name: 'WFS Capabilities',
module: 'wms',
version: VERSION,
worker: false,
extensions: ['xml'],
mimeTypes: ['application/vnd.ogc.wfs_xml', 'application/xml', 'text/xml'],
testText: testXMLFile,
options: {
wfs: {}
},
parse: async (arrayBuffer, options) => parseWFSCapabilities(new TextDecoder().decode(arrayBuffer), options),
parseTextSync: (text, options) => parseWFSCapabilities(text, options)
};
function testXMLFile(text) {
// TODO - There could be space first.
return text.startsWith('<?xml');
}
export const _typecheckWFSCapabilitiesLoader = WFSCapabilitiesLoader;
//# sourceMappingURL=wfs-capabilities-loader.js.map