GastonZalba / ol-describe-feature-type

Format for reading XML WFS Describe Feature Type data

Home Page:https://raw.githack.com/GastonZalba/ol-describe-feature-type/main/examples/converter.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ol-describe-feature-type

npm version npm license

Module to work alongside OpenLayers for reading WFS Describe Feature Type XML data and convert it to JSON.

Online example

See converter to text and parse data

Usage

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);

Changelog

See CHANGELOG for details of changes in each release.

Install

Parcel, Webpack, etc.

NPM package: ol-describe-feature-type.

Install the package via npm

npm install ol-describe-feature-type

TypeScript type definition

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.

Development

# 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 

License

MIT (c) Gastón Zalba.