react-leaflet-figure-editor
v0.2.4
Published
This is plugin for react-leaflet. It create elements on map. Polygon, circle, polyline, point.
Downloads
61
Readme
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='&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 |