We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 089e966 commit dc844afCopy full SHA for dc844af
src/search/geocode.ts
@@ -42,6 +42,11 @@ const searchNzPlaces = async (query: string): Promise<GeocodeResult[]> => {
42
return results
43
}
44
45
+export const findPlace = async (lat: number, lon: number) => {
46
+ const search = await getSearch()
47
+ return search.closest_place(lat, lon, 100)
48
+}
49
+
50
export default async (query: string, sources=[searchNzPlaces]): Promise<GeocodeResult[]> => {
51
const results = await Promise.all(sources.map(s => s(query)));
52
return results.reduce((prev, next) => [...prev, ...next], [])
0 commit comments