Search code examples
rggmap

What does "Error in gzfile" mean when using ggmap?


I'm getting the following error when attempting to obtain a google terrain map of a bbox. What does this mean?

48 tiles needed, this may take a while (try a smaller zoom).
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
  cannot open compressed file '/var/folders/40/dzd1lk550rs2h6_pkbfdrhm40000gn/T//RtmpqYC95O/ggmap/index.rds', probable reason 'No such file or directory'

Here is my code for reference (I have an API key that I have used recently that should work):

ts2 <- get_map(location = c(left =  -81.652049, bottom = 72.228, right = -80.367, top = 72.5), maptype = 'terrain',source = 'google', force = T )
ggmap(ts2)

Solution

  • This may not be the exact answer to how to fix the problem, but a quick uninstall/reinstall of ggmap did the trick.