Closed SwultCode closed 8 months ago
I've also experienced this in the function get_map()
. I input a bounding box and set source = "stamen"
. The error traceback seems to suggest that it happens within the stitch()
function in get_stamenmap()
Hello, same issue here - ggmaps were working perfectly yesterday, today I'm facing same error - I've even tried code from some web tutorial to make sure it's not caused by spelling: Source: https://jtr13.github.io/cc19/stamen-maps-with-ggmap.html
library(ggmap) bbox <- c(bottom = 25.75, top = 49 , right = -67, left = -125) usmap <- get_stamenmap(bbox = bbox, zoom = 6, maptype = 'toner-lite') ggmap(usmap)
After running there is an error:
I'm experiencing the exact same error for code that used to work:
library(ggmap)
US <- c(left = -125, bottom = 10, right = -67, top = 49)
map <- get_stamenmap(US, zoom = 5, maptype = "toner-lite")
I had the same issue but after some digging it turns out that Stamen Maps no longer hosts tiles - manually creating a URL and visiting shows service unavailable. This would require a lot of reworking to use a third-party cache of the Stamen Maps or trying to link to the API for the new host similar to how Google Maps requires an API key
I had the same issue but after some digging it turns out that Stamen Maps no longer hosts tiles - manually creating a URL and visiting shows service unavailable. This would require a lot of reworking to use a third-party cache of the Stamen Maps or trying to link to the API for the new host similar to how Google Maps requires an API key
Turns out the team at StadiaMaps created a PR for this a while ago https://github.com/dkahle/ggmap/pull/351 which adds a register_stadiamaps()
function and replaces get_stamenmap
with get_stadiamap
Current workaround until @dkahle merges the PR (skip step 3 if reading this after merge and just update your install instead)
register_stadimaps()
get_stamenmap
with get_stadiamap
Official instructions found in https://github.com/dkahle/ggmap/issues/350#issuecomment-1750329547
Regarding point 3 >> details on re-instalation of ggmap can be found here: https://docs.stadiamaps.com/guides/migrating-from-stamen-map-tiles/#ggmap
I believe this is fixed by 191159d; please reopen if that isn't the case.
number of rows of matrices must match
Hey,
ggmap
was working just fine yesterday, when I used it today I couldn't make any large maps, by large I mean a big bounding box, the zoom isn't the issue. Whenever I make a map, i.e. one of europe, I get an error ofError in f(init, x[[i]]) : number of rows of matrices must match (see arg 2)
. When I change the bounding box forggmap
to be smaller it works, so I assume it's an issue somewhere there.Below is a reproduce-able example of the error, it continues to happen after I restart r and my computer.
Error in f(init, x[[i]]) : number of rows of matrices must match (see arg 2)