I normally use ggmap
to plot points on a simple city map. When doing this today I came up on a new error that forbids me to use the function get_map()
#get API key @ https://developers.google.com/places/web-service/get-api-key
key<-"AIzaSyCYgKKt2fn7Crt-V6Hnc5aw5lSfy7XLQ-Y"
register_google(key = key)
atw<- get_map(location=c(-88.68,42.14), zoom=10, scale=2)
I am not sure where the problem is. Ive tried a new API key but no luck. Any input?
The error reads:
cannot open URL 'https://maps.googleapis.com/maps/api/staticmap?center=42.14,-88.68&zoom=10&size=640x640&scale=2&maptype=terrain&language=en-EN&key=AIzaSyCYgKKt2fn7Crt-V6Hnc5aw5lSfy7XLQ-Y': HTTP status was '403 Forbidden'Error in download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") : cannot open URL 'https://maps.googleapis.com/maps/api/staticmap?center=42.14,-88.68&zoom=10&size=640x640&scale=2&maptype=terrain&language=en-EN&key=AIzaSyCYgKKt2fn7Crt-V6Hnc5aw5lSfy7XLQ-Y'