ff_layer_fields.Rd
Function to toggle the rice fields layer on an existing leaflet map, and to select which attributes to use to define the symbology of the fields.
ff_layer_fields(
m,
show = TRUE,
measure = "return",
selected_return = NULL,
selected_group = NULL,
selected_object = NULL,
inv_mass_days = 1
)
An initialized leaflet
map object or leafletProxy
object.
A boolean value indicating whether the function call will be adding the layer to the map (TRUE
) or removing the layer from the map (FALSE
). Designed to be changed via shiny
checkbox input by calling the function inside an observer.
A string indicating the measure to show. Choose from return
to color by return type, distance
to color by distance to nearest fish-bearing stream, invmass
to color by modeled invertebrate mass production, or wetdry
to color by wet versus dry sides.
The return_id
of a return point to filter to, if desired.
The group_id
of a watershed to filter to, if desired.
The object_id
of a single field to filter to, if desired. Used internally.
For measure = "invmass"
, select the number of days to calculate the invertebrate mass production.
# show the layer on a leaflet map object ("m")
m <- ff_make_leaflet()
m |> ff_layer_fields(show = TRUE)