// loaders.gl // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors import { parseGML } from "./lib/parsers/gml/parse-gml.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 GML GetCapability request */ export const GMLLoader = { dataType: null, batchType: null, name: 'GML', id: 'gml', module: 'wms', version: VERSION, worker: false, extensions: ['xml'], mimeTypes: ['application/vnd.ogc.gml', 'application/xml', 'text/xml'], testText: testXMLFile, options: { gml: {} }, parse: async (arrayBuffer, options) => parseGML(new TextDecoder().decode(arrayBuffer), options), parseTextSync: (text, options) => parseGML(text, options) }; function testXMLFile(text) { // TODO - There could be space first. return text.startsWith('