mapbox-gl-draw-circle
mapbox-gl-draw-circle copied to clipboard
how to make it work mapbox gl-draw
I have implemented, circlet modes into my mapboxDraw, and I have created a button to call the circle Draw function , but I dont know how to that , what function should I put when "onClick()" any help please
Make sure that you:
- Added draw to map (
map.addControl(draw)
) - Added map draw listeners, draw.create and draw.update
- Created a button which calls to
createCircle()
{draw.changeMode('draw_circle', { initialRadiusInKm: 0.5 });
}