Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

Add the ability to draw curves #1008

Open qpincon opened 3 years ago

qpincon commented 3 years ago

Adding the optional dependency Leaflet.curve will enable the drawing of curves. It is only available for Leaflet >= 1.0. and with the L.curve library imported, with a graceful fallback if it's not the case. I would appreciate a review and get your comments if anything is missing.

qpincon commented 3 years ago

It would be really nice if someone spend some time on reviewing this issue - I spent quite some time on it and I think it is a nice feature to add to the project. Thank you !

matkoniecz commented 3 years ago

It is pretty clear that this plugin is abandoned, see https://github.com/Leaflet/Leaflet.draw/graphs/contributors

Not sure is there a viable replacement - alternative project or a maintained fork

t1a2l commented 3 years ago

@johnd0e‬‏ here

johnd0e commented 3 years ago

Adding the optional dependency

I do not like this approach, when 3rd-party dependencies need to have special support from main library. It would be better to have some extension methods to be able to add any such feature.

qpincon commented 3 years ago

@johnd0e About your comment, I agree that it is not ideal. I guess a solution would be to create yet an other repo making the bridge between Leaflet.Draw and Leaflet.Curve, but that would require some changes in the architecture of Leaflet.Draw that are beyond the scope of this PR. I suggest merging this PR as-is (if all is good), and migrate in the future if this new architecture comes to life.

qpincon commented 3 years ago

It seems that the travis checks are stuck, I tried closing and reopening the issue, with no success.

patrickoliveras commented 3 years ago

Check out leaflet-geoman. It practically does everything leaflet-draw does and then some. Plus it's not, you know, abandoned.