mapOptions

0th

Percentile

Set options on a leaflet map object

Set options on a leaflet map object

Usage
mapOptions(map, zoomToLimits = c("always", "first", "never"))
Arguments
map

A map widget object created from leaflet()

zoomToLimits

Controls whether the map is zooms to the limits of the elements on the map. This is useful for interactive applications where the map data is updated. If "always" (the default), the map always re-zooms when new data is received; if "first", it zooms to the elements on the first rendering, but does not re-zoom for subsequent data; if "never", it never re-zooms, not even for the first rendering.

Aliases
  • mapOptions
Examples
# NOT RUN {
# Don't auto-zoom to the objects (can be useful in interactive applications)
leaflet() %>%
  addTiles() %>%
  addPopups(174.7690922, -36.8523071, "R was born here!") %>%
  mapOptions(zoomToLimits = "first")
# }
Documentation reproduced from package leaflet, version 2.0.2, License: GPL-3

Community examples

Looks like there are no examples yet.