
Fetch a Google satellite basemap for a preset area
Source:R/get_satellite_map.R
get_satellite_map.RdConvenience wrapper around ggmap::get_map() that retrieves a Google
Maps satellite basemap for one of the preset areas used in Smith (2025). It
returns a ggmap raster object suitable as the first layer of a plot via
ggmap::ggmap().
Usage
get_satellite_map(area = c("se_asia", "saigon", "hue"))Details
This function **downloads imagery from the Google Maps Static API at call time** — it does not ship or cache any Google imagery with the package. Google's Maps Platform Terms do not permit redistributing their map imagery, so you must supply your own (free) API key first:
ggmap::register_google(key = "YOUR_GOOGLE_MAPS_API_KEY")
m <- get_satellite_map("hue")
ggmap::ggmap(m)The preset areas reproduce the basemaps used in the package's mapping
articles: "se_asia" (mainland Southeast Asia), "saigon", and
"hue".
Note
Requires the ggmap package and a registered Google Maps API key. If you use these basemaps, please cite ggmap: Kahle, D. and Wickham, H. (2013). "ggmap: Spatial Visualization with ggplot2." The R Journal, 5(1), 144–161. Map imagery \(\copyright\) Google.
Examples
if (FALSE) { # \dontrun{
ggmap::register_google(key = "YOUR_GOOGLE_MAPS_API_KEY")
ggmap::ggmap(get_satellite_map("se_asia"))
} # }