mapshot2 not saving base layers to PNG

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


m = mapview(breweries)
html_fl = tempfile(fileext = ".html")
png_fl = tempfile(fileext = ".png")

create standalone .html

mapshot2(m, url = html_fl)

create standalone .png; temporary .html is removed automatically unless

'remove_url = FALSE' is specified

mapshot2(m, file = png_fl)
mapshot2(m, file = png_fl,
remove_controls = c("homeButton", "layersControl"))

create .html and .png

mapshot2(m, url = html_fl, file = png_fl)

for png results in ;

has anyone else had this issue? We have tried to add in user-agent etc, but still get no streetmap layers.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.