getbb("Salzburg")
place_name <- "Hereford"
getbb(place_name, silent = FALSE)
# return bb whose display_name contain text string "United States"
getbb(place_name, display_name_contains = "United States", silent = FALSE)
# top 3 matches as data frame
getbb(place_name, format_out = "data.frame", limit = 3)
# using an alternative service (locationiq requires an API key)
key <- Sys.getenv("LOCATIONIQ") # add LOCATIONIQ=type_your_api_key_here to .Renviron
if(nchar(key) == 32) {
getbb(place_name, base_url = "http://locationiq.org/v1/search.php", key = key)
}
Run the code above in your browser using DataLab