-
Notifications
You must be signed in to change notification settings - Fork 507
/
Copy pathmapOptions.Rd
28 lines (27 loc) · 1.03 KB
/
mapOptions.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/leaflet.R
\name{mapOptions}
\alias{mapOptions}
\title{Set options on a leaflet map object}
\usage{
mapOptions(map, zoomToLimits = c("always", "first", "never"))
}
\arguments{
\item{map}{A map widget object created from \code{\link[=leaflet]{leaflet()}}}
\item{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 \code{"always"} (the default), the map always
re-zooms when new data is received; if \code{"first"}, it zooms to the
elements on the first rendering, but does not re-zoom for subsequent data;
if \code{"never"}, it never re-zooms, not even for the first rendering.}
}
\description{
Set options on a leaflet map object
}
\examples{
# 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")
}