Add layer to a Leaflet web map - no zoom and with popups enabled.
Source:R/fct_add_layers_leafgl_popups.R
add_layers_leafgl_popups.Rdadd_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.
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_dfof data values to map fill / marker colours to when drawing the features.- map_colour
fill colour palette - RColorBrewer palettes such as
"YlOrRd".- popups
character vector of column names to use as popup labels.
- waiter
waiter object to display while the map is rendering.
Value
leaflet proxy object.