https://github.com/gastonzalba/ol-wfs-capabilities
Open Layers format for reading WFS capabilities data
https://github.com/gastonzalba/ol-wfs-capabilities
capabilities geoserver getcapabilities ol openlayers parser wfs xml
Last synced: 8 months ago
JSON representation
Open Layers format for reading WFS capabilities data
- Host: GitHub
- URL: https://github.com/gastonzalba/ol-wfs-capabilities
- Owner: GastonZalba
- Created: 2023-07-26T12:50:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T14:31:00.000Z (over 2 years ago)
- Last Synced: 2025-08-30T00:22:12.548Z (10 months ago)
- Topics: capabilities, geoserver, getcapabilities, ol, openlayers, parser, wfs, xml
- Language: JavaScript
- Homepage: https://raw.githack.com/GastonZalba/ol-wfs-capabilities/main/examples/converter.html
- Size: 308 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ol-wfs-capabilities
Module to work alongside OpenLayers for reading WFS Capabilities data (versions 1.0.0, 1.1.0 and 2.0.0) and convert it to JSON, complementing the native classes `ol/format/WMSCapabilities` and `ol/format/WMTSCapabilities`.
OpenLayers (at least up to 8.1.0 version) does not have a native way to do this (see related [issue](https://github.com/openlayers/openlayers/issues/8909)), hence the creation of this module that does not depend on any other external dependency other than what comes with OpenLayers.
## Online example
See [converter](https://raw.githack.com/GastonZalba/ol-wfs-capabilities/main/examples/converter.html) to text and parse data
## Usage
```js
import WFSCapabilities from 'ol-wfs-capabilities';
const parser = new WFSCapabilities();
const parsedCapabilities = parser.read(myWfsCapabilitiesSource);
```
## Changelog
See CHANGELOG for details of changes in each release.
## Install
### Parcel, Webpack, etc.
NPM package: [ol-wfs-capabilities](https://www.npmjs.com/package/ol-wfs-capabilities).
Install the package via `npm`
```shell
npm install ol-wfs-capabilities
```
### 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
```shell
# 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.