See the Mapbox Static Tiles API documentation for more information.
Usage
addMapboxTiles(
map,
style_id,
username,
style_url = NULL,
scaling_factor = c("1x", "0.5x", "2x"),
access_token = NULL,
layerId = NULL,
group = NULL,
options = leaflet::tileOptions(),
data = leaflet::getMapData(map),
attribution = TRUE
)
Arguments
- map
A map widget object created by
leaflet::leaflet()
- style_id
The style ID of a Mapbox style
- username
A Mapbox username
- style_url
A Mapbox style URL
- scaling_factor
The scaling factor to use when rendering the tiles. A scaling factor of
"1x"
(the default) returns 512px by 512px tiles. A factor of"1x"
returns 256x256 tiles, and a factor of"2x"
returns 1024x1024 tiles.- access_token
Your Mapbox access token; which can be set with
mb_access_token()
.- layerId
the layer ID
- group
The name of the group the Mapbox tile layer should belong to (for use in Shiny and to modify layers control in a Leaflet workflow)
- options
A list of extra options (optional)
- data
The data object used to derive argument values; can be provided to the initial call to
leaflet::leaflet()
- attribution
If
TRUE
, pass a standard attribution toleaflet::addTiles()
. IfFALSE
, attribution isNULL
. attribution can also be a character string including HTML.