map.FLightR.ggmap error in Geolocator Discussion & Support Posted November 26, 2019 I went around the block with google maps for a couple of hours and could not get past this cryptic error message when trying to download a simple example map: ggmap::register_google(key = APIkey) map <- get_map(location = "texas", zoom = 6, source = "stamen") Source : https://maps.googleapis.com/maps/api/staticmap?center=texas&zoom=6&size=640x640&scale=2&maptype=terrain&key=xxx Error in aperm.default(map, c(2, 1, 3)) : invalid first argument, must be an array In addition: Warning message: In get_googlemap(center = location, zoom = zoom, filename = filename) : HTTP 400 Bad Request Others have had this issue and some have solved it--there are some suggestions on stackoverflow--but not me. I tried a bunch of enabling and management options for static maps API, but nothing worked. Maybe something has changed recently with google or ggmap?? Anyway, I'm now building my maps from scratch using get_stamenmap(). Might be a better future option for map.FLightR.ggmap().