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)