mapview (version 2.7.8)

addHomeButton: Add a home button / zoom-to-layer button to a map.

Description

These functions are deprecated. Please use leafem::addHomeButton and leafem::removeHomeButton instead.

Usage

addHomeButton(
  map,
  ext,
  layer.name = "layer",
  position = "bottomright",
  add = TRUE
)

removeHomeButton(map)

Arguments

map

a mapview or leaflet object.

ext

the extent / bbox to zoom to.

layer.name

the name of the layer to be zoomed to (or any character string)

position

the position of the button (one of 'topleft', 'topright', 'bottomleft', 'bottomright'). Defaults to 'bottomright'.

add

logical. Whether to add the button to the map (mainly for internal use).

Functions

  • removeHomeButton: remove a homeButton from a map