mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
fix(places): small places stop at 500 km even in tiles that reach past it
Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
d2797dbad2
commit
75e345aa07
2 files changed
+16
-1
No files matched your search
@@ -339,7 +339,14 @@ export async function placesNear(
|
||||
const found = [
|
||||
...cities.filter((city) => city.distanceKm <= radius),
|
||||
...detail
|
||||
.flatMap((source) => citiesWithin(source, latitude, longitude, radius))
|
||||
.flatMap((source) =>
|
||||
citiesWithin(
|
||||
source,
|
||||
latitude,
|
||||
longitude,
|
||||
Math.min(radius, PLACE_TILE_KM),
|
||||
),
|
||||
)
|
||||
.filter((place) => !twinOfCity(place)),
|
||||
];
|
||||
const seen = new Set();
|
||||
|
||||
Reference in new issue
Block a user