Initialize a Mapbox GL Map
mapboxgl(
style = NULL,
center = c(0, 0),
zoom = 0,
bearing = 0,
pitch = 0,
projection = "globe",
parallels = NULL,
access_token = NULL,
bounds = NULL,
width = "100%",
height = NULL,
...
)An HTML widget for a Mapbox map.
The Mapbox style to use.
A numeric vector of length 2 specifying the initial center of the map.
The initial zoom level of the map.
The initial bearing (rotation) of the map, in degrees.
The initial pitch (tilt) of the map, in degrees.
The map projection to use (e.g., "mercator", "globe").
A vector of two numbers representing the standard parallels of the projection. Only available when the projection is "albers" or "lambertConformalConic".
Your Mapbox access token.
The bounding box to fit the map to. Accepts one of the following:
sf object;
output of st_bbox();
unnamed numeric vector of the form c(xmin, ymin, xmax, ymax).
The width of the output htmlwidget.
The height of the output htmlwidget.
Additional named parameters to be passed to the Mapbox GL map.
if (FALSE) {
mapboxgl(projection = "globe")
}
Run the code above in your browser using DataLab