mkm-react-map
v0.4.23
Published
React map component for MKM
Downloads
1,457
Readme
MKM map component
This 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
andhybriid@GMC
layers - https://geoportaal.maaamet.ee/est/Teenused/Avalik-WMS-teenus-p65.html
EESTIFOTO
,HYBRIID
andTOPOYKSYS_6569
layers
Using in a project
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 <Map />;
};
Documentation
This project uses React Styleguidist to generate documentation.
For viewing generated documentations run the following commands in the repository root:
npm i
npm run docs
and open browser at the running port (default is 6060).
Development
Refer to /src/development for more information about developing this component.
Versioning and publishing npm package
Creating a new version
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
Publishing a new version
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
Utils
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