1
我设置了一个自定义按钮,按照How to click a button and start a new polygon without using the Leaflet.draw UI和How to initiate the draw function without toolbar?来启动绘图。但是,一旦有人点击这个自定义按钮,我无法弄清楚如何模仿Cancel
按钮的行为,这样我可以有类似leaflet.draw中的“取消”按钮触发了什么功能/事件?
<input type="button" onclick="stopEdits()" value="Click to Stop Drawing">
function stopEdits() {
//Cancel Drawing
}