HighlightBuilder
Defined in: map/highlight.ts:47
Builder handed to custom hover/highlight draw fns, scoped to ONE source drawable. Everything recorded lands in the overlay group (drawn on top, inheriting the source layer’s clipTo/sizeMode). World coordinates throughout. Geometry comes from the Scene’s already-projected subpaths/circles — no re-projection, no datum re-processing.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HighlightBuilder(
g,d,colors):HighlightBuilder
Defined in: map/highlight.ts:53
Parameters
Section titled “Parameters”colors
Section titled “colors”PendingColor[]
Returns
Section titled “Returns”HighlightBuilder
Properties
Section titled “Properties”anchor
Section titled “anchor”
readonlyanchor: [number,number] |null
Defined in: map/highlight.ts:49
The drawable’s glyph anchor, or a point feature’s projected center; null for plain paths.
Methods
Section titled “Methods”defaultHighlight()
Section titled “defaultHighlight()”defaultHighlight():
void
Defined in: map/highlight.ts:111
The hover: true default: a white outline for paths (fill stays transparent so
translucent bases don’t compound); a stroked ring just outside circle drawables
(circles themselves are fill-only so a ring is drawn separately).
Returns
Section titled “Returns”void
path()
Section titled “path()”path(
draw,style?):void
Defined in: map/highlight.ts:95
Record an arbitrary path (standard PathContext: moveTo/lineTo/arc/rect/…).
Note: a stroke is only visible when style.lineWidth > 0 (backends suppress zero-width strokes).
Parameters
Section titled “Parameters”(ctx) => void
style?
Section titled “style?”HighlightStyle = {}
Returns
Section titled “Returns”void
point()
Section titled “point()”point(
x,y,radius,style?):void
Defined in: map/highlight.ts:102
A filled circle at world (x, y).
Parameters
Section titled “Parameters”number
number
radius
Section titled “radius”number
style?
Section titled “style?”string
Returns
Section titled “Returns”void
replay()
Section titled “replay()”replay(
style?):void
Defined in: map/highlight.ts:67
Re-emit the source drawable’s geometry with new styling. Omitted fill/stroke keep the source’s current colors (note: a translucent base fill re-drawn on top of itself compounds — pass an explicit fill to avoid that).
Parameters
Section titled “Parameters”style?
Section titled “style?”HighlightStyle = {}
Returns
Section titled “Returns”void