Closed Falke-Design closed 3 years ago
Hello,
Is there an appetite for this ? I made a pull request into the leaflet-draw plugin, but it seems it is abandonned.
The drawing and editing of bezier curves is made using the Leafet.curve plugin. I made the integration into leaflet-draw so that the drawing of bezier curves can be enabled only if the Leaflet.Curve plugin is previously included.
I don't know if that's something you would be interesed in, and if if it's yes, in which way you would prefer to do it.
To check out what it looks like, you can download this fork and open docs/examples/full.html
.
Cheers!
Yes of course this would be a nice feature. Because of the dependency of Leaflet.curve it would be better that it is supported as a add-on instead of adding it to the core library. Without Leaflet.curve we would add it to the core library.
The best would be to extend L.PM.Draw.Line
and L.PM.Edit.Line
and create a new shape.
Unfortunaly the demo on Leaflet-Draw Fork is not working. Can you create a video and add it here?
Sure, sorry about that, there seems to have some encoding issues with some of the files. Anyway, here are some gifs: Drawing:
Editing:
Looks nice. As I said if it is possible to add this feature without Leaflet.curve we will add it to Geoman. Maybe you can copy the nessery functions from Leaflet.curve. Else it would be a nice sub-plugin.
I will help you when ever you have question ;)
Function to create a bezier curve
https://javascript.info/bezier-curve
871