dev #160

Merged
sora merged 97 commits from dev into master 2025-03-02 01:09:30 +01:00
Showing only changes of commit d63845ed9a - Show all commits

View File

@ -1,4 +1,14 @@
function drop_fields(results) {
results.forEach(e => {
delete e.licence;
delete e.place_rank;
delete e.importance;
delete e.boundingbox;
});
return results
}
export function nominatim_get_data(id: string, bb: string[][] | null = null): Promise<any> {
if (!id) return Promise.resolve([])
@ -11,6 +21,6 @@ export function nominatim_get_data(id: string, bb: string[][] | null = null): Pr
}
return fetch(url).then((res) => {
if (!res.ok) throw new Error("Nominatim Error")
return res.json()
return res.json().then(r => drop_fields(r))
})
}