SDLeafletDraw
ES6 + Babel port of Leaflet.draw (https://github.com/Leaflet/Leaflet.draw)
Adds support for drawing and editing vectors and markers on Leaflet maps.
Supports Leaflet 1.1.0+ branches.
Installation and use
$ npm install sdleafletdraw
sdleafletdraw
Importing ;;// Include the css files;
L.Control.Draw
and add to an L.Map
Create a new const map = 'map';const editableLayers = ;map; const drawControl = draw: polyline: false circle: false marker: false rectangle: color: 'red' fillOpacity: 01 opacity: 1 weight: 4 polygon: color: 'blue' fillOpacity: 01 opacity: 08 weight: 25 position: 'topleft' allowIntersection: false edit: featureGroup: editableLayers // A leaflet featureGroup ;map; map;