0
votes

I'd like to use Mapbox-GL-Draw in an app, but want to trigger polygon drawing from a button that exists outside the Mapbox map container, and not display the normal drawing control.

A hacky way to do this would be to simply move the button after it's created, but is there a simple, cleanish way to start the drawing process?

1

1 Answers

4
votes

Oh, it looks like the answer is as simple as:

drawControl.changeMode('draw_polygon');