/** * TrackingLayer — the Tracking half of "Routing & Tracking" (spec, v0.6.7). * Wraps a single `IconLayer`: renders the CURRENT (or smoothly interpolating) * position of one tracked entity, with bearing-derived rotation. * * v1 scope: ONE tracked entity per layer — the LAST row in `data` is "the" * position. Fleet/multi-entity tracking on one layer is a documented * follow-on, not built here (mirrors this codebase's own "v1 supports one, * generalizing to many is a later tier" precedent — e.g. BIM model * federation's "multiple co-registered models... NOT implemented"). * * Position data arrives through the ORDINARY `data`/`source` mechanism (the * design doc is explicit: a tracking feed is "a thin registerSource decoder * over existing machinery", not a new subscription abstraction) — * TrackingLayer itself knows nothing about where the data came from, same as * any other curated layer reading `data`. * * Interpolation between updates and camera-follow are driven EXTERNALLY by * `src/tracking-interpolation.ts` via the per-frame channel * (`RuntimeCore.patchAnimatedProps`) — never inside this class, matching how * RouteLayer never touches the camera itself either. When * `interpolatedPosition` is present (injected only, never authored) it * overrides the raw data-derived position; the un-interpolated fallback * keeps this layer fully functional — just not smooth — even before the * first interpolation frame lands (e.g. the very first fix, headless mode, * or `prefers-reduced-motion`). */ import { CompositeLayer } from "@deck.gl/core"; import type { Layer } from "@deck.gl/core"; export interface TrackingLayerProps { data?: readonly unknown[]; getPosition?: (d: unknown, info: { index: number; data: readonly unknown[]; }) => [number, number]; bearingField?: string; color?: string; size?: number; /** Marker shape: "arrow" (default), "car", or "motorcycle" — all drawn nose-up and baked in `color`, so rotation and tinting work identically. Unknown values fall back to the arrow (validation warns). */ icon?: string; /** Injected by src/tracking-interpolation.ts — never authored. */ interpolatedPosition?: [number, number]; interpolatedBearing?: number; [prop: string]: unknown; } export declare class TrackingLayer extends CompositeLayer { static layerName: string; static defaultProps: { bearingField: string; color: string; size: number; icon: string; }; renderLayers(): Layer[]; }