View source: R/add_fullscreen_button.R
add_fullscreen_button | R Documentation |
Add a button to a Leaflet map that toggles full screen on and off. Functionality provided by the leaflet-fullscreen plugin for Leaflet.
add_fullscreen_button(map, pseudo_fullscreen = FALSE, position = "topleft")
map |
'leaflet'. Map widget object |
pseudo_fullscreen |
'logical' flag. Whether to fullscreen to page width and height. |
position |
'character' string. Position of the button on the web map. Possible values are "topleft", "topright", "bottomleft", and "bottomright". |
A new HTML web map
with added element, an object of class 'leaflet'.
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
make_map
function for creating a map widget.
make_map(maps = "Topo") |>
add_fullscreen_button()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.