Streams points as a zero-copy GLMP binary Float32Array buffer directly to
a custom WebGL2 instanced point shader (with anti-aliased SDF circles, stroke
outlines, variable radius, and interactive picking).
Usage
add_points(
map,
data = NULL,
lon = NULL,
lat = NULL,
color = "#00d4ff",
palette = "viridis",
radius = 5,
opacity = 0.85,
stroke = TRUE,
stroke_color = "#ffffff",
stroke_width = 1,
popup = NULL,
label = NULL,
id = NULL,
group = NULL,
dynamic_viewport = FALSE,
legend = TRUE
)Arguments
- map
A
glmapwidget orglmap_proxy.- data
An
sf,sfc, ordata.frameobject.- lon
Optional longitude column name or formula (
~lon) fordata.frame.- lat
Optional latitude column name or formula (
~lat) fordata.frame.- color
Color string, formula (
~val), or column name.- palette
Color palette name (
"viridis","plasma","magma","turbo","Spectral", etc.).- radius
Point radius in pixels (single number, formula
~size, or numeric vector).- opacity
Numeric fill opacity (
0to1).- stroke
Logical; whether to draw a crisp anti-aliased stroke around each point.
- stroke_color
Stroke color string (default
"#ffffff").- stroke_width
Stroke width in pixels (default
1.0).- popup
Optional formula (
~name), column name, or character vector for click/hover tooltips.- label
Alias for
popup.- id
Layer ID string.
- group
Layer group name shown in the interactive layer switcher.
- dynamic_viewport
Logical; if
TRUE, builds an in-memory C++ spatial index and streams only the visible viewport slice via the localhttpuvserver.- legend
Logical; whether to automatically add a legend when
coloris mapped to data.