feat(assistant): hike, walk and route cards with their lines on the map, and "Plan this"

This commit is contained in:
Maurice
2026-10-22 15:50:47 +02:00
parent 8547006742
commit 59313dfaff
135 changed files with 12185 additions and 234 deletions
@@ -2,6 +2,7 @@ import type { ViewportPadding } from '../../utils/mapViewport';
import { useAssistantMarkerClasses } from './assistantCamera';
import { AssistantCameraController } from './AssistantCameraController';
import { AssistantGhostLayer } from './AssistantGhostLayer';
import { AssistantGhostLineLayer } from './AssistantGhostLineLayer';
import { useReportViewLeaflet } from './assistantViewport';
import type { AssistantMapProps } from './mapViewContract';
@@ -15,15 +16,20 @@ interface AssistantMapLeafletProps {
/**
* Everything the assistant does on the Leaflet map, mounted inside the map
* container as one child, so MapView only hands its props on: the ghosts,
* the camera, the pop and pulse on the real pins, and the part of the map
* the assistant is told is on screen.
* container as one child, so MapView only hands its props on: the routes
* its cards show, the ghosts, the camera, the pop and pulse on the real
* pins, and the part of the map the assistant is told is on screen.
*/
export function AssistantMapLeaflet({ assistant, padding, markerEl }: AssistantMapLeafletProps) {
useAssistantMarkerClasses(markerEl, assistant.poppedPlaceIds, assistant.assistantPulsePlaceId);
useReportViewLeaflet();
return (
<>
<AssistantGhostLineLayer
lines={assistant.assistantRouteLines}
onHover={assistant.onAssistantRouteHover}
onPoint={assistant.onAssistantRoutePoint}
/>
<AssistantGhostLayer
ghosts={assistant.assistantGhosts}
hoveredId={assistant.assistantHoveredId}