Convenience wrapper around add_icons() using the default marker icons.
Usage
add_markers(
map,
data = NULL,
lon = NULL,
lat = NULL,
size = 18,
color = "dodgerblue",
opacity = 1,
tooltip = NULL,
popup = NULL,
id = NULL,
group = NULL,
pickable = TRUE,
size_units = c("pixels", "meters", "common"),
size_min_pixels = NULL,
size_max_pixels = NULL
)Arguments
- map
A maplamina widget created by
maplamina().- data
Data for this layer. If
NULL, uses the defaultdatasupplied tomaplamina().- lon, lat
Longitude/latitude aesthetics (formula or scalar). Required for non-
sfdata.- size, color, opacity
Marker size and color/opacity (can be formulas).
- tooltip, popup
Optional
tmpl()objects (orNULL) for hover/click content.- id, group
Optional layer id and group name.
- pickable
Logical; whether features can be picked (tooltip/popup).
- size_units
Units for
size; one of"pixels","meters", or"common".- size_min_pixels, size_max_pixels
Optional clamp in pixels when using meter/common units.
Examples
d <- data.frame(
lon = runif(1000, -60, 60),
lat = runif(1000, -60, 60),
value = runif(1000, 1, 10)
)
maplamina() |>
add_markers(d, size = ~value * 3)