mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
fix(places): a small place in view comes before a far bigger namesake
findPlace looked at the detail tiles only when no city had the typed name, so a village called Paris in view lost to Paris, France. With includeSmallPlaces it now reads the places near the view as well and takes the nearest place of the name there, city or not. With none near, the largest city of the name still wins. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
ec1fc6bc09
commit
f414df97eb
5 files changed
+89
-24
No files matched your search
@@ -966,7 +966,8 @@ the fleet set loaded at startup, so opening a card fetches no model.
|
||||
country and Wikidata id. `src/data/wikidataCities.js` reads it on the first
|
||||
lookup and answers `nearestCity` (the largest city within 12 km, else the
|
||||
nearest within 60 km), `citiesAround`, `findPlace` ("Paris, France", or the
|
||||
nearest namesake within 150 km of the view, else the largest) and
|
||||
nearest namesake within 150 km of the view, else the largest; asked to, it
|
||||
counts the smaller places of the detail tiles near the view too) and
|
||||
`countryName`. Names match without case or accents ("lodz" finds Łódź). The
|
||||
app never calls Wikidata; `scripts/build-wikidata-cities.mjs` rebuilds the
|
||||
pack and fails if well-known cities are missing or a known grouping such as
|
||||
@@ -8249,7 +8250,10 @@ clears them but the browser's own site data. Setting `PHOTON_URL`
|
||||
empty turns the suggestions off along with it. Small places come from the
|
||||
bundled Wikidata packs and are never looked up online; a small place with
|
||||
the name of a city within 3 km in the same country is that city, and only
|
||||
the city is listed. At most 64 detail tiles are kept in memory, the least
|
||||
the city is listed. A place named in "villages near …" is the nearest of
|
||||
that name within 150 km of the view, small places included, so a village in
|
||||
view comes before a bigger namesake far away; with none near, the largest
|
||||
city of the name. At most 64 detail tiles are kept in memory, the least
|
||||
recently used dropped first.
|
||||
|
||||
### Place-search providers
|
||||
|
||||
Reference in new issue
Block a user