MentorMapIntegrationAdapter
Component Detail
Description
Integration layer connecting the geography matching feature to the peer-mentor-map dependency. Translates between the map feature's data contracts and the local MentorLocation type consumed by the repository and matching service. Buffers map events to keep local coordinates fresh.
mentor-map-integration-adapter
Sources & reasoning
Line 99 directly ties geographic visualization to matching and assignment dispatch (oppdragstildeling), providing the provenance for this feature as a distinct matching capability beyond simple map display. Line 358 places it in Fase 3, normalizing to v1.1. The blueprint lists this feature under Geographic Map View at [v1.1]. Kept as a separate feature from peer-mentor-map because matching logic and the dispatch integration are distinct from rendering the map layer.
-
docs/source/likeperson.md · line 99Geografisk kartvisning av likepersoner for matching og oppdragstildeling (særlig store fylker).
-
docs/source/likeperson.md · line 358Geografisk kartvisning (Blindeforbundet)
Responsibilities
- Subscribe to mentor location update events from peer-mentor-map
- Translate incoming map payloads to internal MentorLocation records
- Persist updated coordinates to MentorLocationRepository
- Expose a manual refresh method for on-demand sync
- Emit staleness warnings when map feed is delayed beyond threshold
Interfaces
subscribe(): void
unsubscribe(): void
syncNow(): Promise<SyncResult>
getLastSyncTimestamp(): Date | null
onStalenessWarning(callback: (delayMs: number) => void): void