【发布时间】:2020-10-03 16:03:19
【问题描述】:
如何在弹窗中添加按钮并在函数中添加onClick?
.setPopup(new mapboxgl.Popup({ offset: 25 })
.setHTML('<button onclick=' + { this.handlePop } + '> Button</button>'))
.addTo(map);
它不起作用。
【问题讨论】:
-
你有这个的jsfiddle或codesandbox吗?