layer_mapbox | R Documentation |
Use mapboxapi to make a Mapbox static map layer
layer_mapbox( data = NULL, dist = NULL, diag_ratio = NULL, unit = "meter", asp = NULL, style_url = "mapbox://styles/mapbox/satellite-streets-v11", style_id = NULL, username = NULL, basemap = FALSE, scale = 0.75, scaling_factor = "1x", attribution = TRUE, logo = TRUE, access_token = NULL, neatline = TRUE, color = "black", bgcolor = "white", size = 1, linetype = "solid", expand = FALSE, hide_grid = TRUE, label_axes = "----", ... )
data |
|
dist |
buffer distance in units. Optional. |
diag_ratio |
ratio of diagonal distance of area's bounding box used as
buffer distance. e.g. if the diagonal distance is 3000 meters and the
"diag_ratio = 0.1" a 300 meter will be used. Ignored when |
unit |
Buffer units; defaults to meter. |
asp |
Aspect ratio of width to height as a numeric value (e.g. 0.33) or
character (e.g. "1:3"). If numeric, |
style_url |
Map style url used to fill style_id and username parameters, Default: "mapbox://styles/mapbox/satellite-streets-v11" |
style_id |
A style ID (required if style_url is |
username |
A Mapbox username (required if |
basemap |
If FALSE, create a standalone layer; if |
scale |
ratio to scale the output image; |
scaling_factor |
The scaling factor of the tiles; either |
attribution |
Controls whether there is attribution on the image.
Defaults to |
logo |
Controls whether there is a Mapbox logo on the image. Defaults to
|
access_token |
A Mapbox access token; which can be set with mb_access_token. |
neatline |
If |
color |
Color of panel border, Default: 'black' |
bgcolor |
Fill color of panel background; defaults to "white". If "none", panel background is set to ggplot2::element_blank() |
size |
Size of panel border, Default: 1 |
linetype |
Line type of panel border, Default: 'solid' |
expand |
Default |
hide_grid |
If |
label_axes |
A description of which axes to label passed to
|
... |
Additional parameter passed to mapboxapi::layer_static_mapbox |
mapboxapi::layer_static_mapbox()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.