powered by
Embedded webshot of leaflet map
save_webshot( map, path_to_img, overwrite = FALSE, vwidth = 800, vheight = 600, cliprect = "viewport", ... )
A leaflet map object
A path to the image file to save
Do you want to clobber any existing file?
see webshot
webshot
arguments passed to webshot
a path to a PNG file
# NOT RUN { if (require(leaflet)) { map <- leaflet() %>% addTiles() %>% addMarkers(lng = 174.768, lat = -36.852, popup = "The birthplace of R") save_webshot(map, tempfile()) } # }
Run the code above in your browser using DataLab