react-leaflet-figure-editor

This is plugin for react-leaflet. It create elements on map. Polygon, circle, polyline, point.

Usage no npm install needed!

<script type="module">
  import reactLeafletFigureEditor from 'https://cdn.skypack.dev/react-leaflet-figure-editor';
</script>

README

React-leaflet-figure-editor

Build Status CircleCI


Install

npm install react-leaflet-figure-editor
yarn add react-leaflet-figure-editor

import React from "react";
import FigureEditor from "react-leaflet-figure-editor";
import { Map, TileLayer } from "react-leaflet";

class App extends React.Component {
  render() {
    return (
      <div className="App">
        <Map center={[47.445745, 40.272891666666666]} zoom={10} ref="map">
          <TileLayer
            attribution='&amp;copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
            url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
          />
          <FigureEditor />
        </Map>
      </div>
    );
  }
}

export default App;

Prop Type Default Description
calbackChange Function () => {} Called after change figures