how i can get google map API key giving error of API key

library(ggmap)
#> Loading required package: ggplot2
#> Google's Terms of Service: https://cloud.google.com/maps-platform/terms/.
#> Please cite ggmap if you use it! See citation("ggmap") for details.
library(mapproj)
#> Loading required package: maps
map <-get_map(location = "pakistan",zoom = 4,maptype = "terrain")
#> Error: Google now requires an API key.
#>        See ?register_google for details.
ggmap(map)
#> Error: ggmap plots objects of class ggmap, see ?get_map

Created on 2019-10-26 by the reprex package (v0.3.0)

Just go to https://cloud.google.com/maps-platform/maps/ and complete the registration (credit card requiered), you would get an API key and then you can register that key on ggmap using register_google() function.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.