makinacorpus / Leaflet.MeasureControl

Leaflet control to mesure distances on the map
https://makinacorpus.github.io/Leaflet.MeasureControl
BSD 3-Clause "New" or "Revised" License
82 stars 48 forks source link

Enhancement - Embed MeasureControl to L.Draw #6

Closed IslamHossam closed 8 years ago

IslamHossam commented 10 years ago

Hello,

First, I thank all contributors for this valuable plugin. Second, Can we embed Measure Control functionality to L.Control.Draw, In Short, I need to draw my shapes "polygon & rectangle "by Leaflet.Draw plugin and show distance that calculated by Leaflet.MeasureControl, without adding MeasureControl control on the map.

Thanks, Islam Hossam

leplatrem commented 10 years ago

Hello,

This plugin relies on Draw to measure an arbitrary line, but is not meant the other way around.

If you want to add measure to a line being edited, it would be more relevant to open an issue on leaflet draw instead, and request a showLength feature, just as there is a showAreaoption for polygons already...

Good luck !

fredericbonifas commented 8 years ago

Checking the Leaflet.Draw demo, it is now possible to display the distance while drawing a line: http://leaflet.github.io/Leaflet.draw/