@opengeoweb/sigmetdeprecated

GeoWeb Sigmet library for the opengeoweb project

Usage no npm install needed!

<script type="module">
  import opengeowebSigmet from 'https://cdn.skypack.dev/@opengeoweb/sigmet';
</script>

README

current version coverage

Sigmet

React component library with Sigmet components for the opengeoweb project. This library was generated with Nx.

Installation

npm install @opengeoweb/sigmet

Use

You can use any component exported from sigmet by importing them, for example:

import { SigmetWrapper } from '@opengeoweb/sigmet'

API

Documentation of the API can be found on Swagger (make sure you're connected to the KNMI network). ADD API DOCUMENTATION

The front-end uses the axios library to fetch data from the api. Importing components from the Sigmet repository should be wrapped by the ApiProvider component with a specified baseURL. Example:

import { ApiProvider } from '@opengeoweb/api';
import { SigmetWrapper } from '@opengeoweb/sigmet';

const myAuth = {
  username: 'string',
  token: 'string',
  refresh_token: 'string',
};

const Component = () => {
  const [auth, onSetAuth] = React.useState(myAuth);

  return (
      <ApiProvider
        baseURL="http://test.com"
        appURL="http://app.com"
        auth={auth}
        onSetAuth={onSetAuth}
        createApi={createApi}
        authTokenUrl="url/tokenrefresh"
      >
        <SigmetWrapper />
      </ApiProvider>
  )}

Documentation

https://opengeoweb.gitlab.io/opengeoweb/docs/sigmet/