1.0.18 • Published 4 years ago

react-leaflet-craft v1.0.18

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

npm version

react-leaflet-craft

React component built on top of react-leaflet that integrates Leaflet-Craft library.

Install

npm install react-leaflet-craft

Make sure that you have the following peer dependencies installed.

npm install leaflet react-leaflet leaflet-craft ramda react react-dom

Getting started

Please make sure that you go through Leaflet-Craft readme before integrating this component.

You need to wrap this component into Map component and pass the options as shown below.

import { Map } from 'react-leaflet';
import Freedraw, { ALL } from 'react-leaflet-craft';

const Component = () => (
  <Map>
    <Freedraw
      mode={ALL}
      onMarkers={this.handleOnMarkers}
      onModeChange={this.handleModeChange}
      ref={this.freedrawRef}
    />
  </Map>
);

It supports all the options mentioned in Leaflet-Craft.

A detailed example of how to use this component is in the example folder of this repo. To run the example,

  1. Clone this repo
  2. Run npm i
  3. Run npm run example
1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago