The functions get_googlemap()
and get_stadia_map()
tries to harmonize the calls to ggmap()
. The objective is
to get interchangeable functions with sensible defaults. For example automatic calculation of the zoom. The function
bbox_lv95()
generates a bbox object compatible with both functions.
Usage
get_stadia_map(
bbox,
maptype = "stamen_terrain",
width = 640,
zoom = "auto",
color = "bw",
...
)
Arguments
- bbox
list with items
left
,bottom
,right
andtop
as WSG84 coordinates. Additionalwidth
in meters ifzoom = "auto"
. Usebbox_lv95()
to create a compatible bounding box list- maptype
stamen_terrain, stamen_toner, stamen_toner_lite, stamen_watercolor, stamen_terrain_background, stamen_toner_background, stamen_terrain_lines, stamen_terrain_labels, stamen_toner_lines, stamen_toner_labels.
- width
of resulting map in pixels.
- zoom
zoomlevel from 0 to 18 or "auto"
- color
color or black-and-white. Changed default to "bw"
- ...
forwarded to
ggmap::get_stadiamap()
API-Key
To obtain an API key and enable services, go to https://client.stadiamaps.com/signup/. It is completely free for non-commercial and evaluation use (a license is for commercial use; see https://stadiamaps.com/pricing for pricing), and no credit card is required to sign up.
For details see ggmap::register_stadiamaps()
.
Attribution
Details on attribution can be found at https://stadiamaps.com/attribution.