Skip to contents

Adds zoom buttons and/or compass control.

Usage

add_navigation(
  map,
  position = "topright",
  compass = TRUE,
  zoom_controls = TRUE,
  ...
)

Arguments

map

A maplamina widget created by maplamina().

position

Control position: "topleft", "topright", "bottomleft", "bottomright".

compass

Logical; show compass control.

zoom_controls

Logical; show zoom buttons.

...

Named options passed through to the underlying MapLibre control.

Value

The modified map widget.

Examples

maplamina() |>
  add_navigation(position = "topright", compass = FALSE)