# NOT RUN {
library(leaflet)
leaf <- leaflet() %>%
addTiles() %>%
addEasyButton(easyButton(
icon = htmltools::span(class='star','★'),
onClick = JS("function(btn, map){ map.setZoom(1);}")))
library(leaflet)
leaf <- leaflet() %>%
addTiles() %>%
addEasyButtonBar(
easyButton(
icon = htmltools::span(class='star','★'),
onClick = JS("function(btn, map){ alert('Button 1');}")),
easyButton(
icon = htmltools::span(class='star','⌖'),
onClick = JS("function(btn, map){ alert('Button 2');}")))
# }
Run the code above in your browser using DataLab