Home

@terrestris/react-geo 5.6.2

react-geo

Build Status Coverage Status dependencies Status devDependencies Status Greenkeeper badge Known Vulnerabilities license: 2-Clause BSD

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
  • jsdoc for API documentation
  • autogenerated examples from a template, including highlighted source code

Feature List

You can find a complete Feature List in the WiKi.

Examples and API documentation

Visit https://terrestris.github.io/react-geo/

Workshop

Visit https://terrestris.github.io/react-geo-ws

Installation

npm i @terrestris/react-geo

Requirements

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
        }
      }
    ]
  }]
}

Development notes

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