Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_map returns HTTP 400 Bad Request #331

Open
stitam opened this issue May 5, 2022 · 0 comments
Open

get_map returns HTTP 400 Bad Request #331

stitam opened this issue May 5, 2022 · 0 comments

Comments

@stitam
Copy link

stitam commented May 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant