addControl(map, html, position = c("topleft", "topright", "bottomleft", "bottomright"),
layerId = NULL, className = "info legend", data = getMapData(map))addTiles(map, urlTemplate = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
attribution = NULL, layerId = NULL, group = NULL, options = tileOptions())
addWMSTiles(map, baseUrl, layerId = NULL, group = NULL, options = WMSTileOptions(),
attribution = NULL, layers = "")
addPopups(map, lng = NULL, lat = NULL, popup, layerId = NULL, group = NULL,
options = popupOptions(), data = getMapData(map))
addMarkers(map, lng = NULL, lat = NULL, layerId = NULL, group = NULL, icon = NULL,
popup = NULL, options = markerOptions(), clusterOptions = NULL, clusterId = NULL,
data = getMapData(map))
addCircleMarkers(map, lng = NULL, lat = NULL, radius = 10, layerId = NULL,
group = NULL, stroke = TRUE, color = "#03F", weight = 5, opacity = 0.5,
fill = TRUE, fillColor = color, fillOpacity = 0.2, dashArray = NULL,
popup = NULL, options = pathOptions(), clusterOptions = NULL, clusterId = NULL,
data = getMapData(map))
addCircles(map, lng = NULL, lat = NULL, radius = 10, layerId = NULL, group = NULL,
stroke = TRUE, color = "#03F", weight = 5, opacity = 0.5, fill = TRUE,
fillColor = color, fillOpacity = 0.2, dashArray = NULL, popup = NULL,
options = pathOptions(), data = getMapData(map))
addPolylines(map, lng = NULL, lat = NULL, layerId = NULL, group = NULL, stroke = TRUE,
color = "#03F", weight = 5, opacity = 0.5, fill = FALSE, fillColor = color,
fillOpacity = 0.2, dashArray = NULL, smoothFactor = 1, noClip = FALSE,
popup = NULL, options = pathOptions(), data = getMapData(map))
addRectangles(map, lng1, lat1, lng2, lat2, layerId = NULL, group = NULL,
stroke = TRUE, color = "#03F", weight = 5, opacity = 0.5, fill = TRUE,
fillColor = color, fillOpacity = 0.2, dashArray = NULL, smoothFactor = 1,
noClip = FALSE, popup = NULL, options = pathOptions(), data = getMapData(map))
addPolygons(map, lng = NULL, lat = NULL, layerId = NULL, group = NULL, stroke = TRUE,
color = "#03F", weight = 5, opacity = 0.5, fill = TRUE, fillColor = color,
fillOpacity = 0.2, dashArray = NULL, smoothFactor = 1, noClip = FALSE,
popup = NULL, options = pathOptions(), data = getMapData(map))
addGeoJSON(map, geojson, layerId = NULL, group = NULL, stroke = TRUE, color = "#03F",
weight = 5, opacity = 0.5, fill = TRUE, fillColor = color, fillOpacity = 0.2,
dashArray = NULL, smoothFactor = 1, noClip = FALSE, options = pathOptions())
addTopoJSON(map, topojson, layerId = NULL, group = NULL, stroke = TRUE, color = "#03F",
weight = 5, opacity = 0.5, fill = TRUE, fillColor = color, fillOpacity = 0.2,
dashArray = NULL, smoothFactor = 1, noClip = FALSE, options = pathOptions())
leaflet()
data
object provided to leaflet()
initially, but can be overriddenclearGroup
and addLayersControl
purposes).
Human-friendly group names are pe~x
where x
is a variable in data
; by default (if not
explicitly provided), it will be automatically inferred from data
by
looking for a lng
argument; the names lat
and latitude
are used when guessing
the latitude column from data
)htmlEscape()
for security reasons)list(iconUrl = '?', iconSize = c(x, y))
, and you can use
icons()
to create multiple icons; note when you use an R list
thaNULL
, markers will be clustered using
markerClusterOptions()
to specify madata
(units in meters for circles, and pixels for circle markers)map
objectaddControl
: Add arbitrary HTML controls to the mapaddTiles
: Add a tile layer to the mapaddWMSTiles
: Add a WMS tile layer to the mapaddPopups
: Add popups to the mapaddMarkers
: Add markders to the mapaddCircleMarkers
: Add circle markers to the mapaddCircles
: Add circles to the mapaddPolylines
: Add polylines to the mapaddRectangles
: Add rectangles to the mapaddPolygons
: Add polygons to the mapaddGeoJSON
: Add GeoJSON layers to the mapaddTopoJSON
: Add TopoJSON layers to the maptileOptions
, WMSTileOptions
,
popupOptions
, markerOptions
,
pathOptions