Skip to contents

Create a Marker

Usage

Marker(lng_lat, popup = NULL, ...)

Arguments

lng_lat

Longitude and latitude coordinates of the marker, measured in degrees based on WGS84 (EPSG:4326) standard.

popup

The Popup that is displayed when a user clicks on the marker.

...

Additional marker options

Examples

marker <- Marker(
  lng_lat = c(9.5, 51.31667),
  popup = list(text = "This is a marker", options = list(closeButton = FALSE)),
  color = "darkred"
)

maplibre(mapOptions(center = c(9.5, 51.31667)), zoom = 4) |>
  add_marker(marker)