addMapboxTiles.Rd
See the Mapbox Static Tiles API documentation for more information.
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
)
A map widget object created by leaflet::leaflet()
The style ID of a Mapbox style
A Mapbox username
A Mapbox style URL
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.
Your Mapbox access token; which can be set with
mb_access_token()
.
the layer ID
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)
A list of extra options (optional)
The data object used to derive argument values; can be provided
to the initial call to leaflet::leaflet()
If TRUE
, pass a standard attribution to
leaflet::addTiles()
. If FALSE
, attribution is NULL
. attribution can
also be a character string including HTML.
A pointer to the Mapbox Static Tiles API which will be translated appropriately by the leaflet R package.