add_globe_control | R Documentation |
This function adds a globe control to a MapLibre GL map that allows toggling between "mercator" and "globe" projections with a single click.
add_globe_control(map, position = "top-right")
map |
A map object created by the |
position |
The position of the control. Can be one of "top-left", "top-right", "bottom-left", or "bottom-right". Default is "top-right". |
The modified map object with the globe control added.
## Not run:
library(mapgl)
maplibre() |>
add_globe_control(position = "top-right")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.