ui/map/routes/RouteDrawingPreview¶
Classes¶
RouteDrawingPreview¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:38
RouteDrawingPreview - Temporary map sources and layers for the route drawing preview. Owns all MapLibre state associated with the in-progress draw: placed waypoint markers, connecting line, leader line from the anchor (aircraft or last existing waypoint), and the dashed cursor preview.
The manager feeds it the current route points and leader anchor; this class doesn't hold the drawing state itself.
Constructors¶
Constructor¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:42
Parameters¶
mapDisplay¶
stateManager¶
Returns¶
Methods¶
setup()¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:56
Set up temporary GeoJSON sources/layers for drawing preview.
Layers: - temp-route-draw-leader: solid line from leader anchor → first waypoint - temp-route-draw-line: solid line connecting placed waypoints - temp-route-draw-preview: dashed line from last waypoint → cursor - temp-route-draw-points + temp-route-draw-labels: numbered markers
Returns¶
void
updateDrawing()¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:129
Update placed waypoint markers, connecting line, and leader line.
Parameters¶
routePoints¶
object[]
leaderAnchor¶
| {
lat: number;
lng: number;
}
| null
Returns¶
void
updateCursor()¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:163
Update the dashed preview segment. - No waypoints placed yet: preview runs from the leader anchor → cursor so the user can see where their first waypoint will attach. - Otherwise: preview runs from the last placed waypoint → cursor.
Parameters¶
cursor¶
lat¶
number
lng¶
number
routePoints¶
object[]
leaderAnchor¶
| {
lat: number;
lng: number;
}
| null
Returns¶
void
clearCursor()¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:186
Remove just the dashed cursor-preview segment.
Returns¶
void
clear()¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:192
Returns¶
void
teardown()¶
Defined in: ui/map/routes/RouteDrawingPreview.ts:198
Returns¶
void