Home

Awesome

Leaflet.Editable.Drag npm version

Feature dragging functionality for Leaflet.Editable

Usage

  1. Include:
require('leaflet-editable');
require('leaflet-path-drag');
require('leaflet-editable-drag');

or

<script type="text/javascript" src="path/to/Leaflet.Editable.js"></script>
<!-- packed together with L.Path.Drag -->
<script type="text/javascript" src="path/to/dist/L.Editable.Drag.js"></script>

Beware of the versions: Rectangle editing and drawing support is only on gh-pages branch of Leaflet.Editable

  1. Ensure your features are draggable:
// this will be passed to the constructor
map.editTools.startPolygon(null, { draggable: true });

Contributing

leaflet-0.7 branch is for the older version of leaflet and leaflet-editable

git clone https://github.com/w8r/Leaflet.Editable.Drag.git
cd Leaflet.Editable.Drag
npm i
npm start
...
npm run build

Thanks

Thanks to @yohanboniface for the wonderful and configurable Leaflet.Editable.

License

Leaflet.Editable.Drag is released under the WTFPL licence.