3

I am looking for a way to draw bezier curves in my mapbox gl js app. Just like this very interesting example : https://demos.mapbox.com/bezier-drawing-tool/

Unfortunately i don't find any documentation about this demo and its exactly what i am searching for.

In this demo, when you select the pen tool you can start a bezier curve by dragging the mouse. In edit mode, Bezier handles shows up and allow the user to modify the bezier spline.

The mapbox gl draw https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md is a very promising API but there is currently no support for bezier curve. i also looked in the available custom modes but found nothing.

As a fallback, i think i could develop a custom mode with mapbox gl draw to support bezier curves by subdividing the line in multiple segment. But before going that way i would like to know if there is already an existing support for drawing bezier curves ?

Thank you

JeffS
  • 41
  • 3
  • 1
    Finally i developed a custom Bezier Curve mode myself. here it is : : https://github.com/Jeff-Numix/mapbox-gl-draw-bezier-curve-mode – JeffS Sep 07 '21 at 20:41

0 Answers0