Description Usage Arguments Examples
Create a mapboxer widget
1 2 3 |
source |
A mapbox_source that is added to the map with the ID |
style |
The map's Mapbox style. |
... |
The properties of the map, see https://docs.mapbox.com/mapbox-gl-js/api/map/. |
width |
The width of the widget. |
height |
The height of the widget. |
element_id |
The unique ID of the widget. |
token |
A Mapbox API access token. Only needed if you want to use styles from Mapbox. |
1 2 3 4 5 6 7 8 9 | map <- mapboxer(
center = c(-73.9165, 40.7114),
zoom = 10,
minZoom = 6,
pitch = 30,
bearing = 45
)
if (interactive()) map
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.