Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在应用程序中使用 Mapbox-GL-Draw,但想从 Mapbox 地图容器外部的按钮触发多边形绘制,而不是显示正常的绘图控件。
一个 hacky 方法是在创建按钮后简单地移动按钮,但有没有一种简单、干净的方法来启动绘图过程?
哦,看起来答案很简单:
drawControl.changeMode('draw_polygon');