View source: R/fct_add_layers_leaflet_no_zoom.R
add_layers_leaflet_no_zoom | R Documentation |
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.
add_layers_leaflet_no_zoom(
map_object,
map_active_df,
map_var,
map_colour,
waiter
)
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_colour |
fill colour palette - RColorBrewer palettes such as |
waiter |
waiter object to display while the map is rendering. |
Calling this function does not change the zoom or extent of the Leaflet map to fit the contents drawn on the map. Used for keeping the zoom extent the same but updating colour, opacity, and other styling options.
leaflet proxy object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.