Title: | GGPlot Mapbox Basemap |
---|---|
Description: | Static mapbox basemap for ggplot2. |
Authors: | Anthony North [aut, cre], Miles McBain [aut] |
Maintainer: | Anthony North <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.2 |
Built: | 2024-10-16 03:16:29 UTC |
Source: | https://github.com/anthonynorth/snapbox |
Get static Mapbox map as a georeferenced raster
get_static_map( area, map_style = mapbox_dark(), mapbox_api_access_token = Sys.getenv("MAPBOX_ACCESS_TOKEN"), retina = TRUE, scale_ratio = 1, area_buffer = 0, mapbox_logo = TRUE, attribution = TRUE, purge_cache = FALSE )
get_static_map( area, map_style = mapbox_dark(), mapbox_api_access_token = Sys.getenv("MAPBOX_ACCESS_TOKEN"), retina = TRUE, scale_ratio = 1, area_buffer = 0, mapbox_logo = TRUE, attribution = TRUE, purge_cache = FALSE )
area |
the map area |
map_style |
mapbox style, see |
mapbox_api_access_token |
mapbox api access token |
retina |
render the map at 2x scale if |
scale_ratio |
ratio to scale the output image; |
area_buffer |
a buffer to appear around the |
mapbox_logo |
include mapbox logo on the image if TRUE |
attribution |
include attribution on the image if TRUE. You still have a legal responsibility to attribute maps that use OpenStreetMap data, which includes most maps from Mapbox. If you specify attribution=FALSE, you are legally required to include proper attribution elsewhere on the webpage or document. https://docs.mapbox.com/api/maps/#static-images and https://docs.mapbox.com/help/how-mapbox-works/attribution/#static–print |
purge_cache |
forget cached api calls and responses before making api call if TRUE. |
Create a mapbox map ggplot layer
layer_mapbox( area, map_style = mapbox_dark(), mapbox_api_access_token = Sys.getenv("MAPBOX_ACCESS_TOKEN"), retina = TRUE, scale_ratio = 1, area_buffer = 0, mapbox_logo = TRUE, attribution = TRUE, purge_cache = FALSE )
layer_mapbox( area, map_style = mapbox_dark(), mapbox_api_access_token = Sys.getenv("MAPBOX_ACCESS_TOKEN"), retina = TRUE, scale_ratio = 1, area_buffer = 0, mapbox_logo = TRUE, attribution = TRUE, purge_cache = FALSE )
area |
the map area |
map_style |
mapbox style, see |
mapbox_api_access_token |
mapbox api access token |
retina |
render the map at 2x scale if |
scale_ratio |
ratio to scale the output image; |
area_buffer |
a buffer to appear around the |
mapbox_logo |
include mapbox logo on the image if TRUE |
attribution |
include attribution on the image if TRUE. You still have a legal responsibility to attribute maps that use OpenStreetMap data, which includes most maps from Mapbox. If you specify attribution=FALSE, you are legally required to include proper attribution elsewhere on the webpage or document. https://docs.mapbox.com/api/maps/#static-images and https://docs.mapbox.com/help/how-mapbox-works/attribution/#static–print |
purge_cache |
forget cached api calls and responses before making api call if TRUE. |