Add-on package for the Leaflet package to provide Mapbox.js v2.4.0 bindings.
Mapbox.js provides several mapbox specific extensions which should be natively available in R, hence the package.
# For now you will need to build leaflet using a branch of mine
devtools::install_github('rstudio/leaflet')
devtools::install_github('bhaskarvk/leaflet.mapbox')
library(leaflet.mapbox)
leafletMapbox(access_token=<YOUR ACCESS TOKEN>) %>%
addMapboxTileLayer(mapbox.classicStyleIds$dark)
leafletMapbox()
as an alternative to leaflet::leaflet()
to initialize Mapbox specific Map.addMapboxTileLayer()
function to add Mapbox TileLayer.mapbox.classicStyleIds
list for a convenient list of mapbox classic style ids.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.