// loaders.gl, MIT license import { parseWCSCapabilities } from "./lib/wcs/parse-wcs-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 WCS GetCapability request */ export const WCSCapabilitiesLoader = { dataType: null, batchType: null, id: 'wcs-capabilities', name: 'WFS Capabilities', module: 'wms', version: VERSION, worker: false, extensions: ['xml'], mimeTypes: ['application/vnd.ogc.wcs_xml', 'application/xml', 'text/xml'], testText: testXMLFile, options: { wms: {} }, parse: async (arrayBuffer, options) => parseWCSCapabilities(new TextDecoder().decode(arrayBuffer), options), parseTextSync: (text, options) => parseWCSCapabilities(text, options) }; function testXMLFile(text) { // TODO - There could be space first. return text.startsWith('