Skip to contents

The panel mounts previously-declared controls by bind id (see section() and sections()).

Usage

add_panel(
  map,
  title = NULL,
  description = NULL,
  icon = NULL,
  dividers = TRUE,
  position = NULL,
  sections = NULL
)

Arguments

map

A maplamina widget created by maplamina().

title

Panel title.

description

Optional panel description.

icon

Optional URL for a small icon shown beside the title.

dividers

Logical; whether to render divider lines between sections.

position

Optional corner position for the panel container: "topleft", "topright", "bottomleft", "bottomright".

sections

Panel layout, created with sections(section("id"), ...).

Value

The modified map widget.

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), bind = "filters") |>
  add_panel(sections = sections(section("filters")))