GeomSfText
Simple-features text labels: places aes.label at representative geometry points (Multi* → one label per part; stat_sf_coordinates).
Defaults
- geom
sf_text- default stat
sf_coordinates- default position
identity- params type
SfTextParams
Svelte component
import { GGPlot, GeomSfText } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomSfText />
</GGPlot> JSON layer
{
"geom": "sf_text",
"stat": "sf_coordinates"
} Params
geometrystringName of the data column holding GeoJSON Geometry JSON strings. Default "geometry".
alphanumberText opacity. Must be between 0 and 1 (inclusive). Default 1.
sizenumberFont size in px. Must be greater than 0. Default 11.
anchor"start" | "middle" | "end"Horizontal text anchor relative to the representative point: "start", "middle" (default), or "end".
dxnumberHorizontal offset in px applied after positioning. Default 0.
dynumberVertical offset in px applied after positioning (positive = down). Default 0.
Allowed stats
sf_coordinatesdefault
Allowed positions
identitydefault