Module to work alongside OpenLayers for reading WFS Describe Feature Type XML data and convert it to JSON.
See converter to text and parse data
import DescribeFeatureType from 'ol-describe-feature-type';
const parser = new DescribeFeatureType();
const parsedData = parser.read(describeFeatureTypeXML);
// use ´readFormatted´ to get an object emulating a native geoserver/mapserver json response
const parsedDataFormated = parser.readFormatted(describeFeatureTypeXML);
See CHANGELOG for details of changes in each release.
NPM package: ol-describe-feature-type.
Install the package via npm
npm install ol-describe-feature-type
TypeScript types are shipped with the project in the dist directory and should be automatically used in a TypeScript project. Interfaces are provided for the Options.
# install dependencies
npm install
# run test
npm test
# run test without pretest
npx jest
# run online example locally on http://localhost:3009/
npm run watch
MIT (c) Gastón Zalba.