I know this question was asked before, but I haven't found an answer for it. I am trying to show a map of a city in ggmap
function. It seems that since 2018, we have to register using google API
code as described here:
https://cran.r-project.org/web/packages/ggmap/readme/README.html
or
https://rdrr.io/cran/ggmap/man/register_google.html
I tried following these examples and used the following code:
library(ggmap)
register_google(key = "xxxxxxxx-RXRy215NIV1yyyyyyyyyyyyyyyyy")
geocode("mannheim")
The result I get is this:
Source : https://maps.googleapis.com/maps/api/geocode/json?address=mannheim&key=xxxx
Warning: Geocoding "mannheim" failed with error:
This API project is not authorized to use this API.
# A tibble: 1 x 2
lon lat
<dbl> <dbl>
1 NA NA
Any idea as how I can fix this issue? I recently generated the API through google account and it should be valid.