I am trying, and failing, to create a png file from a mapview / leaflet map. All renders well in HTML, but the conversion to png does not show the base layers (ie streetmap). I have added in proxy settings, but still i get the same image.
Test code im using;
setting proxy in terminal;
export http_proxy=http://username:passwordI@proxyURL:port
library(utils)
m = mapview(breweries)
html_fl = tempfile(fileext = ".html")
png_fl = tempfile(fileext = ".png")create standalone .html
mapshot2(m, url = html_fl)
browseURL(html_fl)create standalone .png; temporary .html is removed automatically unless
'remove_url = FALSE' is specified
mapshot2(m, file = png_fl)
browseURL(png_fl)
mapshot2(m, file = png_fl,
remove_controls = c("homeButton", "layersControl"))
browseURL(png_fl)create .html and .png
mapshot2(m, url = html_fl, file = png_fl)
browseURL(png_fl)
browseURL(html_fl)
for png results in ;