get_map returns HTTP 400 Bad Request
- Dominant language
- R
- Stars
- 778
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
The example in the `get_map()` documentation produces an error in my environment and it seems I cannot get a map with this function at all. For some reason reprex does not return the same error I see when executing the expression without reprex, so I am pasting directly from my console:
```
ggmap::get_map(c(-97.14667, 31.5493))
Source : https://maps.googleapis.com/maps/api/staticmap?center=31.5493,-97.14667&zoom=10&size=640x640&scale=2&maptype=terrain&language=en-EN&key=xxx-I0PSI858s2k0wWLKygpbWC97Ot74U
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, maptype = maptype, :
HTTP 400 Bad Request
```
I get a similar error when I try `get_googlemap()` directly:
```
ggmap::get_googlemap(c(-97.14667, 31.5493))
Source : https://maps.googleapis.com/maps/api/staticmap?center=31.5493,-97.14667&zoom=10&size=640x640&scale=2&maptype=terrain&key=xxx-I0PSI858s2k0wWLKygpbWC97Ot74U
Error in aperm.default(map, c(2, 1, 3)) :
invalid first argument, must be an array
In addition: Warning message:
In ggmap::get_googlemap(c(-97.14667, 31.5493)) : HTTP 400 Bad Request
```
At this point I cannot get any maps with these functions. I am registered with Google and e.g. `geocode()` works properly. Any help with this would be highly appreciated. Many thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.