Registers one or more filters for a layer. When multiple layers share the same bind,
controls merge across layers by (bind, label, type).
Arguments
- map
A maplamina widget created by
maplamina().- ...
One or more
filter_range()/filter_select()objects (or a single list of them).- id
Optional id used as a shorthand bind id when
bindis omitted.- bind
Bind group id for shared UI control.
- position
Optional UI position hint (applied to the control group).
- layer_id
Target layer id (defaults to the most recently added layer).
Examples
d <- data.frame(
lon = runif(1000, -60, 60),
lat = runif(1000, -60, 60),
value = runif(1000, 1, 10)
)
maplamina() |>
add_circles(d) |>
add_filters(
filter_range(~value, default = c(4, 6)),
bind = "filters"
)