0

I'm using Leaflet to draw polylines on a map and of course its possible to drag the endpoints, but I'm curious whether it would be able to curve a polyline? In order to for example, draw around corners more smoothly.

1
  • Polylines in Leaflet are just set of points, there are no curvatures defined. So if you want polyline to be more curved, you just have to add more points to make it look like it's curved. If you don't want to do it yourselves, you can experiment for example with turf.bezierSpline method from turf.js library.
    – TomazicM
    Aug 11 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.