Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Bezier curve function #872

Closed
Falke-Design opened this issue Apr 21, 2021 · 4 comments
Closed

[Feature] Add Bezier curve function #872

Falke-Design opened this issue Apr 21, 2021 · 4 comments

Comments

@Falke-Design
Copy link
Collaborator

Function to create a bezier curve

https://javascript.info/bezier-curve

#871

@qpincon
Copy link

qpincon commented Sep 2, 2021

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!

@Falke-Design
Copy link
Collaborator Author

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?

@qpincon
Copy link

qpincon commented Sep 2, 2021

Sure, sorry about that, there seems to have some encoding issues with some of the files. Anyway, here are some gifs:
Drawing:
draw

Editing:
edit

@Falke-Design
Copy link
Collaborator Author

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants