Learn R Programming

mapdeck (version 0.3.5)

add_sf: Add sf

Description

Adds an sf object to the map.

Usage

add_sf(map, data = get_map_data(map), ...)

Arguments

map

a mapdeck map object

data

data to be used in the layer. All coordinates are expected to be EPSG:4326 (WGS 84) coordinate system

...

other argumetns passed to one of the plotting layers. See details

Details

The plotting layer is determined by the type of sf geometries.

  • POINT and MULTIPOINT objects will call add_scatterplot

  • LINESTRING and MULTILINESTRING objects will call add_path

  • POLYGON and MULTIPOLYGON objects will call add_polygon

  • GEOMETRY objects will call add_geojson