Skip to main content

PointHitTester

Thin adapter: WebGpuPointsRenderer.pickFeatureIdAtCanvasPixelFeatureStore.getById, plus optional extent scan via the store.

Import

import { PointHitTester, type GetFeatureAtPixelOptions } from "stratum-map";

Constructor

new PointHitTester(renderer: WebGpuPointsRenderer, store: FeatureStore)

Methods

getFeatureAtPixel(options): Promise<StoredFeatureRecord | null>

FieldTypeDescription
x, ynumberBacking-store canvas pixels

Returns null on miss or unknown id.

getFeaturesInExtent(extent): StoredFeatureRecord[]

Uses bbox metadata from FeatureStore.ingestRecordsWithPositions.

Performance notes

  • GPU pick has fixed cost per query — throttle hover probes.
  • Extent query cost grows with indexed record count.

See also