add_layers_leaflet: Add a layer to a Leaflet web map

View source: R/fct_add_layers_leaflet.R

add_layers_leafletR Documentation

Add a layer to a Leaflet web map

Description

add_layers_leaflet adds a spatial layer (of class sf) to a leaflet web map. sf data frames with POINT, LINESTRING, MULTILINESTRING, POLYGON, MULITPOLYGON geometries can be added to the web map.

Usage

add_layers_leaflet(map_object, map_active_df, map_var, map_colour, waiter)

Arguments

map_object

single-element character vector of the ID of the leaflet map object.

map_active_df

the spatial data frame (of class sf) of features to draw on the leaflet map.

map_var

the column in map_active_df of data values to map to fill / marker colours to when drawing the features.

map_colour

fill colour palette - RColorBrewer palettes such as "YlOrRd".

waiter

waiter object to display while the map is rendering.

Value

leaflet proxy object.


livelihoods-and-landscapes/maplandscape documentation built on March 20, 2023, 5:43 a.m.