Add a button to a Leaflet map that zooms to the provided map extent.
Usage
add_home_button(map, extent = NULL, position = "topleft")
Value
A new HTML web map with added element, an object of class 'leaflet'.
Arguments
map
'leaflet'.
Map widget object
extent
'bbox', or 'numeric' vector of length four, with xmin, xmax, ymin and ymax values.
Extent object representing a rectangular geographical area on the map.
The extent must be specified in the coordinate reference system (CRS) of the web map,
usually in latitude and longitude using WGS 84 (also known as EPSG:4326).
By default, the extent will be automatically determined from
latitudes and longitudes of the map elements.
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