# NOT RUN {
m = mapview(breweries)
## create standalone .html
mapshot(m, url = paste0(getwd(), "/map.html"))
## create standalone .png; temporary .html is removed automatically unless
## 'remove_url = FALSE' is specified
mapshot(m, file = paste0(getwd(), "/map.png"))
mapshot(m, file = paste0(getwd(), "/map.png"),
remove_controls = c("homeButton", "layersControl"))
## create .html and .png
mapshot(m, url = paste0(getwd(), "/map.html"),
file = paste0(getwd(), "/map.png"))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab