Leaflet / Leaflet

🍃 JavaScript library for mobile-friendly interactive maps 🇺🇦
https://leafletjs.com
BSD 2-Clause "Simplified" License
40.17k stars 5.75k forks source link

Add support for curved polylines/polygons using Bézier curves #9286

Open serso opened 2 months ago

IvanSanchez commented 2 months ago

Besides, there's plugins like https://github.com/elfalem/Leaflet.curve , so I must ask the question of what does this need to be in the Leaflet core.

serso commented 2 months ago

so I must ask the question of what does this need to be in the Leaflet core.

My thinking was that smooth drawing (using curves and not just connecting the dots) of polylines/polygons is an essential feature and if the Leaflet core supports polylines/polygons it should also be able to draw them smoothly.

there's plugins like https://github.com/elfalem/Leaflet.curve

This particular plugin doesn't do what I want - it draws curves via SVG commands passed explicitly. I want to draw curved polygons, e.g. have an ordered set of dots and draw curves between smoothly (and automatically). It should be possible though to transform the polygons into SVG commands by hand and pass the result to Leaftlet.curve.

I leave it up to the maintainers to decide whether this should be a core feature of the lib or it should be implemented externally.