save_webshot | R Documentation |
Embedded webshot of leaflet map
save_webshot( map, path_to_img, overwrite = FALSE, vwidth = 800, vheight = 600, cliprect = "viewport", ... )
map |
A leaflet map object |
path_to_img |
A path to the image file to save |
overwrite |
Do you want to clobber any existing file? |
vwidth |
see |
vheight |
see |
cliprect |
see |
... |
arguments passed to |
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()) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.