powered by
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")
A new HTML web map with added element, an object of class 'leaflet'.
map
'leaflet'. Map widget object
'logical' flag. Whether to fullscreen to page width and height.
'character' string. Position of the button on the web map. Possible values are "topleft", "topright", "bottomleft", and "bottomright".
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
make_map function for creating a map widget.
make_map
make_map(maps = "Topo") |> add_fullscreen_button()
Run the code above in your browser using DataLab