A lightweight JavaScript client library for OGCAPI - Features.
This library works with endpoints defined at:
- OGC API - Features - Part 1: Core
- OGC API - Features - Part 2: Coordinate Reference Systems by Reference
- OGC API - Features - Part 3: Filtering and the Common Query Language (CQL)
See more details at the documentation.
npm install @ogcapi-js/features
This library uses the global fetch function for HTTP requests. Please consider using isomorphic-fetch for polyfill.
require('isomorphic-fetch');
const { FeatureService } = require('@ogcapi-js/features');
// create a new service client
const service = new FeatureService({
baseUrl: 'https://ogcapi.service.com'
});
// get all collections from the service
const collections = await services.getCollections();
Modern browsers already support the global fetch
function so there is no need to polyfill.
import { Service } from `@ogcapi-js/features`;
// create a new service client
const service = new FeatureService({
baseUrl: 'https://ogcapi.service.com'
});
// get all collections from the service
const collections = await services.getCollections();