A set of geo related modules. To use in combination with react, antd and ol.
- testing using jest on es6 modules, optionally with coverage
- webpack to produce optimized and debug builds
- documented using React Styleguidist
- autogenerated examples from a template, including highlighted source code
You can find a complete Feature List in the wiki.
Visit https://terrestris.github.io/react-geo/
Visit https://terrestris.github.io/react-geo-ws
npm i @terrestris/react-geo
react-geo is designed to be used with es6-modules. To use a component just import it like we do it in the examples:
import {
CircleMenu,
SimpleButton,
MapComponent,
MapProvider,
mappify
} from '@terrestris/react-geo';
The use of webpack and babel is recommended. You need to configure a less-loader inside your webpack-config to receive react-geo
specific styling.
module: {
loaders: [{
test: /\.less$/,
loaders: [
'style-loader',
'css-loader',
{
loader: 'less-loader',
options: {
modifyVars: CustomAntThemeModifyVars(),
javascriptEnabled: true // Less version > 3.0.0
}
}
]
}]
}
If you like to develop a react-geo component out of your project make use of npm link:
In react-geo:
npm link
In your project:
npm link @terrestris/react-geo