Learn R Programming

webmap (version 1.1.1)

add_fullscreen_button: Add full-screen button to a web map

Description

Add a button to a Leaflet map that toggles full screen on and off. Functionality provided by the leaflet-fullscreen plugin for Leaflet.

Usage

add_fullscreen_button(map, pseudo_fullscreen = FALSE, position = "topleft")

Value

A new HTML web map with added element, an object of class 'leaflet'.

Arguments

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".

Author

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

See Also

make_map function for creating a map widget.

Examples

Run this code
make_map(maps = "Topo") |>
  add_fullscreen_button()

Run the code above in your browser using DataLab