GeocodingClient
Component Detail
Description
Wraps the external geocoding API used to convert free-text location strings into coordinate pairs. Applies request batching, response caching, and retry logic. Required when assignment target addresses arrive as text rather than pre-resolved coordinates.
geocoding-client
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
- Geocode a single address string to Coordinates
- Batch geocode multiple addresses in a single API round-trip
- Cache responses with configurable TTL to reduce API cost
- Retry transient failures with exponential backoff
- Surface quota exhaustion errors with actionable diagnostics
Interfaces
geocode(address: string): Promise<Coordinates>
geocodeBatch(addresses: string[]): Promise<(Coordinates | null)[]>
clearCache(): void
getQuotaStatus(): QuotaStatus
Related Data Entities (1)
Data entities managed by this component