LayerOptions
Defined in: map/geo-map.ts:12
Declarative interaction options shared by every engine’s retained layers. The machinery
(hover overlay, tooltip, selection styling, hit-testing) lives entirely in BaseEngine —
these options are just the per-layer surface that both BaseEngine.select’s and the
hover/tooltip dispatch read. Plot.layer()/Plot.points() and GeoMap.layer() forward them
into the LayerSpec via BaseEngine.interactionFields, so the contract has one home.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”Properties
Section titled “Properties”clipTo?
Section titled “clipTo?”
optionalclipTo?:string
Defined in: map/geo-map.ts:15
draggable?
Section titled “draggable?”
optionaldraggable?:boolean
Defined in: map/base-engine.ts:115
Opt this layer’s glyphs into node-drag (#140): a plain drag starting on a glyph moves it
(instead of panning), reheating the layout. Honored only by engines that implement node-drag
(BaseEngine.beginNodeDrag — currently network()); ignored by geoMap/plot. The pointer
listeners are attached when the layer is registered, like selectable.
Inherited from
Section titled “Inherited from”InteractiveLayerOptions.draggable
optionalfill?:string| ((f,i) =>string)
Defined in: map/geo-map.ts:13
hideOnInteraction?
Section titled “hideOnInteraction?”
optionalhideOnInteraction?:boolean
Defined in: map/geo-map.ts:28
Drop this layer from the render while interacting — a rotation drag or a zoom/pan gesture (re-projects + reappears when the gesture ends). Use for dense layers so only the cheap layers re-project per rotation frame.
hover?
Section titled “hover?”
optionalhover?:HoverOption<F> |HoverOptions<F>
Defined in: map/base-engine.ts:100
Hover-highlight, symmetric with selection (#162). true enables the default outline/ring.
A HoverOptions object — { hovered?, others? } — styles it: hovered is how the hovered
item looks (a HighlightStyle redraw / custom (datum, HighlightBuilder) draw fn on Scene
layers; the ring’s stroke on instanced lanes), and others fades the non-hovered glyphs (the
hover analogue of selection.others, opt-in — honored on instanced lanes via the shader, so it’s
a uniform change that stays free even on a full LOD-off draw). A bare HighlightStyle/draw-fn is
still accepted as shorthand for { hovered: … }. The hovered item is redrawn in a tiny overlay
layer — O(hovered item) per change; the base layer is untouched.
Inherited from
Section titled “Inherited from”
optionalid?: (f,i) =>string|number
Defined in: map/geo-map.ts:22
Parameters
Section titled “Parameters”F
number
Returns
Section titled “Returns”string | number
lineCap?
Section titled “lineCap?”
optionallineCap?:LineCap
Defined in: map/geo-map.ts:21
End-cap style for open strokes (“butt” default | “square” | “round”).
lineJoin?
Section titled “lineJoin?”
optionallineJoin?:LineJoin
Defined in: map/geo-map.ts:17
Stroke corner style: “bevel” (default) | “miter” | “round”. Identical across backends.
lineWidth?
Section titled “lineWidth?”
optionallineWidth?:number
Defined in: map/geo-map.ts:15
miterLimit?
Section titled “miterLimit?”
optionalmiterLimit?:number
Defined in: map/geo-map.ts:19
Miter length / width above which a miter falls back to a bevel (default 10).
passThrough?
Section titled “passThrough?”
optionalpassThrough?:boolean
Defined in: map/geo-map.ts:43
Render via the backend’s pass-through path: no retained Scene geometry, no hit
index (not pickable). Supports all GeoJSON geometry on both Canvas and WebGL
(Point/MultiPoint → analytic circles; Polygon/Line/etc. → projected paths) — features
are projected/recorded and drawn directly each repaint, so features may be a callback
re-invoked per repaint (you own the data). For huge / fast-changing datasets beyond the
retained ceiling (~4–16M). Trade-off vs the default retained path: retained is always
crisp, interactive, and pickable but capped; pass-through is uncapped + streaming but
shows a slightly stale raster during pan/zoom (re-crisp on settle), isn’t pickable, and
re-tessellates non-point geometry per settle. Paths are world-mode (screen-mode paths
are a follow-up). NOTE: clipTo is NOT applied to pass-through layers yet — it is ignored
(a follow-up); use the retained path if you need clipping.
pickable?
Section titled “pickable?”
optionalpickable?:boolean
Defined in: map/geo-map.ts:31
When false, skip the CPU hit index for this layer (no hover/pick on it) — saves an Entry object per feature; use for huge, non-interactive layers (e.g. streamed points).
pointRadius?
Section titled “pointRadius?”
optionalpointRadius?:number
Defined in: map/geo-map.ts:15
selectable?
Section titled “selectable?”
optionalselectable?:boolean| {multi?:boolean; }
Defined in: map/base-engine.ts:110
Opt this layer into click-driven selection. true or {} = single-select (plain click
replaces the selection). { multi: true } = shift/cmd/ctrl-click toggles add/remove;
plain click replaces. Omitting this option leaves the layer un-selectable (no gesture,
no styling on click). The pointer listeners are attached when the layer is registered —
independently of on("select"), which is a pure observer.
Inherited from
Section titled “Inherited from”InteractiveLayerOptions.selectable
selection?
Section titled “selection?”
optionalselection?:SelectionOptions
Defined in: map/base-engine.ts:91
Styles for BaseEngine.select: the selected set and its complement.
Defaults: selected keeps the base style; others { opacity: 0.3 }.
Inherited from
Section titled “Inherited from”InteractiveLayerOptions.selection
sizeMode?
Section titled “sizeMode?”
optionalsizeMode?:"world"|"screen"
Defined in: map/geo-map.ts:24
“world” (default): radius scales with zoom. “screen”: constant pixel size.
stroke?
Section titled “stroke?”
optionalstroke?:string| ((f,i) =>string)
Defined in: map/geo-map.ts:14
tooltip?
Section titled “tooltip?”
optionaltooltip?: (d,id) =>string|HTMLElement|null
Defined in: map/base-engine.ts:104
Hover tooltip content for this layer (null hides). Shown in a shared engine-managed div —
see tooltipClass for styling. Re-evaluated only when the hovered target changes;
re-declare the layer to force a refresh.
Parameters
Section titled “Parameters”F
string | number
Returns
Section titled “Returns”string | HTMLElement | null