leaflet.draw-box
v1.1.1
Published
Leaflet Draw inspired handlers for leaflet.box
Downloads
7
Readme
Leaflet.draw-box
Leaflet Draw support for leaflet.box inspired by Leaflet.ellipse. Check out the Demo.
Important
Leaflet.draw-box requires
- Leaflet 0.7 or higher
- Leaflet.draw 0.2.4 or higher
- leaflet.box
How to
Traditional
Include Leaflet.draw-box.js in your html
<script src='/path/to/leaflet.box.js'></script>
<script src='/path/to/Leaflet.draw-box.js'></script>
Webpack as non es6 module
import './path/to/leaflet.box'
import './path/to/Leaflet.draw-box'
ES6 module
TODO
Usage
See Leaflet.draw and leaflet.box
Creating:
new L.Draw.Box(map, options*).enable()
new L.Draw.Rect(map, options*).enable()
* Where options are the same structure as for Leaflet.draw
Toggling:
myRect.editing.enable()
myRect.editing.disable()
Checkout
leaflet.arc - Leaflet Arc drawing.
leaflet.draw-arc - Leaflet Draw support for leaflet.arc.
leaflet.sector - Leaflet Sector drawing.
leaflet.draw-sector - Leaflet Draw support for leaflet.sector.
License
This code is provided under the Apache 2.0 license.