React map component for MKM
npm install mkm-react-mapThis is a React based component for displaying maps in MKM applications.
For displaying a base map it uses the following services:
- https://geoportaal.maaamet.ee/est/Teenused/Avalik-WMS-teenus/TMS-WMS-C-ja-WMTS-teenused-p481.html foto@GMC
and hybriid@GMC layers
- https://geoportaal.maaamet.ee/est/Teenused/Avalik-WMS-teenus-p65.html EESTIFOTO, HYBRIID and TOPOYKSYS_6569 layers
To use this component in a React project, run the following command in the project folder:
npm i mkm-react-map
Then import the component where necessary:
``
import React from 'react';
import Map from 'mkm-react-map';
const MyComponent = () => {
return ;
};
`
This project uses React Styleguidist to generate documentation.
For viewing generated documentations run the following commands in the repository root:
1. npm i
2. npm run docs
and open browser at the running port (default is 6060).
Refer to /src/development for more information about developing this component.
To create a new version of this component for publishing run:
npm version [patch|minor|major]
for more information about bumping version number see semantic versioning
To successfully publish the package the following requirements need to be met:
- A new version has been created locally
- The user has logged in to npm via npm login
After completing these actions run:
npm publish
for more information about publishing see https://docs.npmjs.com/cli/publish
to generate API client stubs execute the following (assuming src_swaggers_geoapi file is in the same folder):
openapi-generator-cli generate -i ./api-docs.yaml -o . -g javascript`