Add simple features geometries from sf
Arguments
- map
A
leaflet
ormapview
map.- data
A
sf
object to be added to themap
.- pane
The name of the map pane for the features to be rendered in.
- ...
Further arguments passed to the respective
leaflet::add*
functions. See addCircleMarkers, addPolylines and addPolygons.
Examples
library(leaflet)
leaflet() %>% addProviderTiles("OpenStreetMap") %>% addCircleMarkers(data = breweries91)
leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(data = breweries91)
leaflet() %>% addProviderTiles("OpenStreetMap") %>% addPolylines(data = atlStorms2005)
leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(atlStorms2005)
leaflet() %>% addProviderTiles("OpenStreetMap") %>% addPolygons(data = gadmCHE)
leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(gadmCHE)