Plugin that extracts point features from an MVT overlay and manages their screen-space
occupation, preventing label crowding via a hierarchical lock system and raycasted depth
placement. Rendering is left entirely to the caller via the driver's onPointsUpdate /
onLabelsUpdate.
On this page
Properties
maxSettleTimeMs: number = 1
Time budget in milliseconds per frame for settling annotations onto the tile geometry.
maxOccupancyUpdateTimeMs: number = 0.5
Time budget in milliseconds per frame for the sliced occupancy layout pass.
maxParseTimeMs: number = 1
Time budget in milliseconds per frame for parsing toggled vector tiles into annotations.
horizonCutoff: number = 0.1
Hides annotations once dot( surface normal, direction to camera ) falls below this, removing
those near the horizon. Raise it to display annotations closer, set it to 0 to disable.
resolution: number | null = 50
Target resolution used when selecting the vector tile level to load. Lower values load coarser tiles with fewer annotations. Set to null to use the overlay resolution.
useIdleCallback: boolean = true
Whether pending annotation work is additionally processed in idle callbacks between frames.
Methods
new MVTAnnotationsPlugin(
options: {
// The `PMTilesOverlay` (or compatible overlay) whose tile content is parsed for point features.
overlay: Object,
// Initial camera. Can be updated with `setCamera()`.
camera: Camera = null,
// Supplies the annotation callbacks: feature filtering, placement priority, per-character sizing, and render updates. Cannot be changed once initialized.
driver?: MVTAnnotationsDriver,
// Target resolution used when selecting the vector tile level to load. This is equivalent to "resolution" value in ImageOverlayPlugin used to drive loaded levels of detail for the overlays. Lower values load coarser tiles with fewer annotations, independently of the shared overlay's own resolution. Set to null to use the overlay resolution.
resolution: number | null = 50
}
)