@ogcapi-js/features
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@ogcapi-js/features

npm

A lightweight JavaScript client library for OGCAPI - Features.

This library works with endpoints defined at:

See more details at the documentation.

Installation

npm install @ogcapi-js/features

Usage

Node.js

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

Browser

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

Readme

Keywords

none

Package Sidebar

Install

npm i @ogcapi-js/features

Weekly Downloads

71

Version

1.1.1

License

MIT

Unpacked Size

262 kB

Total Files

12

Last publish

Collaborators

  • haoliang