Learn R Programming

mapview (version 2.2.0)

addFeatures: Type agnositc version of leaflet::add* functions.

Description

Add simple features geomertries from sf

Usage

addFeatures(map, data, ...)

Arguments

map

A leaflet or mapview map.

data

A sf object to be added to the map.

...

Further arguments passed to the respective leaflet::add* functions. See addCircleMarkers, addPolylines and addPolygons.

Value

A leaflet map object.

Examples

Run this code
# NOT RUN {
leaflet() %>% addTiles() %>% addCircleMarkers(data = breweries)
leaflet() %>% addTiles() %>% addFeatures(data = breweries)

leaflet() %>% addTiles() %>% addPolylines(data = atlStorms2005)
leaflet() %>% addTiles() %>% addFeatures(atlStorms2005)

leaflet() %>% addTiles() %>% addPolygons(data = franconia)
leaflet() %>% addTiles() %>% addFeatures(franconia)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab