location radius search

This commit is contained in:
2024-07-24 16:16:25 +02:00
parent acec14d372
commit 38e943c18e
15 changed files with 213 additions and 60 deletions

View File

@@ -59,7 +59,9 @@ export class GeoService {
}
});
});
return state ? result.filter(e => e.state_code.toLowerCase() === state.toLowerCase()) : result;
}
getCityWithCoords(state: string, city: string): City {
return this.geo.states.find(s => s.state_code === state).cities.find(c => c.name === city);
}
}