mapshot pdf
mapshot.RdThis is a mapshot adjustment that saves maps as pdf and
warns users if they choose png
Usage
mapshot(
x,
url = NULL,
file = NULL,
zoom = 2,
vwidth = 1000,
vheight = 850,
remove_controls = c("zoomControl", "layersControl", "homeButton", "scaleBar",
"drawToolbar", "easyButton"),
...
)Arguments
- x
mapvieworleafletobject (or any other hmtlwidget).- url
Output
.htmlfile. If not supplied and 'file' is specified, a temporary index file will be created.- file
Output
.png,.pdf, or.jpegfile.- remove_controls
charactervector of control buttons to be removed from the map when saving to file. Any combination of "zoomControl", "layersControl", "homeButton", "scaleBar", "drawToolbar", "easyButton". If set toNULLnothing will be removed. Ignord ifxis not a mapview or leaflet map.- ...
Further arguments passed on to
saveWidgetand/orwebshot.
Examples
if (FALSE) { # \dontrun{
library(leaflet)
library(councildown)
m <- leaflet() %>%
addTiles() %>%
addCouncilStyle(add_dists = TRUE)
mapshot(m, file = "test.png")
file.remove("test.png")
} # }