Skip to content

Plot

Defined in: map/plot.ts:76

  • BaseEngine

new Plot(host, opts?): Plot

Defined in: map/plot.ts:77

HTMLElement

PlotOptions = {}

Plot

BaseEngine.constructor

clearStyle(name, ids?): this

Defined in: map/base-engine.ts:504

Remove overrides (all of the layer’s when ids is omitted) and restore base styles.

string

string | number | readonly (string | number)[]

this

BaseEngine.clearStyle


destroy(): void

Defined in: map/base-engine.ts:893

void

BaseEngine.destroy


disableInteraction(): this

Defined in: map/base-engine.ts:707

Detach the current pan/zoom or rotation interaction (no-op if none).

this

BaseEngine.disableInteraction


enableZoom(extent?, onTransform?): this

Defined in: map/base-engine.ts:836

Enable scroll-to-zoom / drag-to-pan via d3-zoom, clamped to extent. The optional onTransform callback fires after each setTransform during zoom — use it to keep an HTML overlay (e.g. a LabelLayer) aligned with the GPU geometry as the view changes.

[number, number] = ...

(t) => void

this

BaseEngine.enableZoom


highlight(name, idOrIds, styleOrDraw?): this

Defined in: map/base-engine.ts:554

Highlight one drawable / a set of drawables of name by drawing them into a tiny internal overlay layer on top (inheriting the source’s clipTo/sizeMode) — the base layer’s buffers are untouched, so the per-change cost is tessellating the highlighted items only. styleOrDraw falls back to the layer’s hover option, then to the default white outline. null clears.

string

string | number | readonly (string | number)[] | null

HighlightStyle | HighlightDraw

this

BaseEngine.highlight


layer<D>(name, data, opts): LayerHandle<D>

Defined in: map/plot.ts:81

D

string

readonly D[]

PlotLayerOptions<D>

LayerHandle<D>


on(event, cb): this

Defined in: map/base-engine.ts:856

"click" | "hover"

(hit, ev) => void

this

BaseEngine.on


pick(x, y): HoverHit | null

Defined in: map/base-engine.ts:870

number

number

HoverHit | null

BaseEngine.pick


points<D>(name, data, opts): LayerHandle<D>

Defined in: map/plot.ts:89

D

string

readonly D[] | (() => readonly D[])

PlotPointOptions<D>

LayerHandle<D>


recolor(name): this

Defined in: map/base-engine.ts:477

string

this

BaseEngine.recolor


render(): this

Defined in: map/base-engine.ts:890

this

BaseEngine.render


select(name, set): this

Defined in: map/base-engine.ts:525

Select a set of drawables: style members with the layer’s selection.selected (default: keep base style) and the complement with selection.others (default { opacity: 0.3 }). One O(n) compose + one styles-only push — click-time cost only, nothing per frame. null clears. NOTE: selection rewrites the layer’s whole override map, so it replaces earlier setStyle overrides (one table, last write wins) — and select(null) restores plain base styles.

string

readonly (string | number)[] | ((d, i) => boolean) | null

this

BaseEngine.select


setBackend(type): this

Defined in: map/base-engine.ts:700

BackendType

this

BaseEngine.setBackend


setClip(name, clipTo?): this

Defined in: map/base-engine.ts:685

string

string

this

BaseEngine.setClip


setSize(width, height): this

Defined in: map/base-engine.ts:274

Resize the engine in place to a new CSS size (px) — no teardown. Resizes the live backend, runs the subclass onResize hook (e.g. GeoMap refits its projection), then re-renders and repaints pass-through layers. Layers, view transform, and interaction state are preserved. A no-op when the size is unchanged or either axis is zero (a collapsed/hidden layout). In responsive modes the ResizeObserver calls this automatically; callers in fixed mode use it to apply a new explicit size without recreating the engine.

number

number

this

BaseEngine.setSize


setStyle(name, ids, override): this

Defined in: map/base-engine.ts:491

Override the style of one drawable or a set (replaces any previous override for those ids — last write wins). O(ids) compose + one styles-only push.

string

string | number | readonly (string | number)[]

StyleOverride

this

BaseEngine.setStyle


setTransform(t): this

Defined in: map/base-engine.ts:748

ViewTransform

this

BaseEngine.setTransform


toPNG(): string

Defined in: map/base-engine.ts:892

string

BaseEngine.toPNG


toSVG(): string

Defined in: map/base-engine.ts:891

string

BaseEngine.toSVG


whenReady(): Promise<void>

Defined in: map/base-engine.ts:294

Promise<void>

BaseEngine.whenReady