I am not able to capture map image using webshot::webshot

38 Views Asked by At

I am using the webshot package. The webshot function is not able to capture a screenshot of a map page in png or jpeg format. It works in pdf.

library(webshot)

Wname2<- paste0("MAP", "YYYYMMDDHHMM",".pdf")
webshot("https://www.airquality.nsw.gov.au/air-quality-in-my-area", Wname2, delay = 30)

This works well, I get this map image: map image

Wname2<- paste0("MAP", "YYYYMMDDHHMM",".png")
webshot("https://www.airquality.nsw.gov.au/air-quality-in-my-area", Wname2, delay = 30)

With this code, I don't get any map, but it shows the top half of the page in the png file.

in png

How can I get the map in png format?

0

There are 0 best solutions below