As I did multiple times, I am trying to import a map of Cyprus using the ggmap function in R:
library("ggmap")
library("ggsn")
leftCY = 412259.3; bottomCY = 3811795;
rightCY = 454399.3; topCY = 3837195;
RHO_map <- get_stamenmap(bbox = c(left = leftCY,
bottom = bottomCY,
right = rightCY,
top = topCY),
zoom = 10,
maptype = "terrain")
However, I get the following error:
Error in curl::curl_fetch_memory(url, handle = handle) :
Could not resolve host: tile.stamen.com
I have checked my internet connection and everything is fine. I have seen in some web links Error in curl::curl_fetch_memory(url, handle = handle) with ggmap package
that Tiles are now hosted by Stadia (and require API key) and that I should install from github: remotes::install_github("dkahle/ggmap"). I have installed remotes package, run the suggested command, and rerun the command:
RHO_map <- get_stamenmap(bbox = c(left = leftCY,
bottom = bottomCY,
right = rightCY,
top = topCY),
zoom = 10,
maptype = "terrain")
But I still get the same error, and I am stuck. Is there any suggestion or alternative?
ggmap). I don't know the timeline of release to CRAN, though you can tryremotes::install_github("dkahle/ggmap")in the interim to see if it works (and I encourage you to report success or failure on that same issue).remotes::install_githuband get it to work with the new functions, I suggest you come back here and self-answer talking through the API, theremotes::, and all of it, demonstrating the error and the new method working. You are not the first to ask about this, and I suspect over the next few weeks/months we may see more users needing this help.ggmap-users who follow in your footprints.