向简单按钮添加操作选项,如 leaflet.draw 工具栏删除按钮传单

Add action options to easy-button like in leaflet.draw toolbar delete button leaflet

如何将操作按钮添加到 easy-button 插件,如此处所示?

L.easyButton('glyphicon-refresh', function(){
},{position:'topright'}).addTo(map)

无法完成。

您指出的功能是 "multiple actions per button"。该功能存在于 Leaflet.draw 的 implementation of a toolbar.

该功能存在于Leaflet-easy-button。

为清楚起见:问题中的屏幕截图似乎使用 Leaflet.draw, 而不是 Leaflet-easy-button.