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

#> Loading required package: ggplot2
#> Google's Terms of Service:
#> Please cite ggmap if you use it! See citation("ggmap") for details.
#> 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.
#> 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 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.