// 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.3.1" !== 'undefined' ? "4.3.1" : '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('