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()
If you're API key is working you can also use library(googleway)
to plot interactive maps
library(googleway)
## you can use separate API keys for different APIs
set_key( "GOOGLE_API_KEY", api = "geocode")
set_key( "GOOGLE_MAP_KEY", api = "map")
## you can view the keys you have with
google_keys()
google_map( location = c(52, 0), zoom = 6 )
## add a marker by geocoding an address
res <- google_geocode("Buckingham Palace")
loc <- geocode_coordinates( res )
google_map() %>%
add_markers(data = loc)