get_stadia_map | R Documentation |
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.
get_stadia_map(
bbox,
maptype = "stamen_terrain",
width = 640,
zoom = "auto",
color = "bw",
...
)
bbox |
list with items |
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 |
a ggmap object (a classed raster object with a bounding box attribute)
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()
.
Details on attribution can be found at https://stadiamaps.com/attribution.
bb <- bbox_lv95(2683141, 1249040, 500) # site Zch_Stamfenbachstrasse
get_stadia_map(bb) |>
ggmap::ggmap()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.