Description Usage Arguments See Also Examples
Add a standard control to the map
1 2 3 4 5 6 7 | add_control(map, control_name, ..., pos = NULL)
add_navigation_control(map, ..., pos = NULL)
add_scale_control(map, ..., pos = NULL)
add_fullscreen_control(map, pos = NULL)
|
map |
A mapboxer object. |
control_name |
The (class) name of the control. |
... |
The options of the control. |
pos |
The position of the control. One of |
https://docs.mapbox.com/mapbox-gl-js/api/markers/ for available options for the used control.
1 2 3 4 5 6 7 8 9 10 11 | map <- mapboxer() %>%
add_navigation_control(
pos = "top-left",
showCompass = FALSE
) %>%
add_fullscreen_control() %>%
add_scale_control(
unit = "nautical"
)
if (interactive()) map
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.