refactor(server): reverse geocoding (#2167)

* refactor(server): reverse geocoding

* fix: nullable results
This commit is contained in:
Jason Rasmussen
2023-04-04 18:23:07 -04:00
committed by GitHub
parent 333ab1124b
commit 4cb74f0fe4
12 changed files with 125 additions and 146 deletions

View File

@@ -0,0 +1,17 @@
export const IGeocodingRepository = 'IGeocodingRepository';
export interface GeoPoint {
latitude: number;
longitude: number;
}
export interface ReverseGeocodeResult {
country: string | null;
state: string | null;
city: string | null;
}
export interface IGeocodingRepository {
init(): Promise<void>;
reverseGeocode(point: GeoPoint): Promise<ReverseGeocodeResult>;
}