Repository navigation
fix(transit): link a station's stops by its local name, not a translation - #725
Merged
Merged
Conversation
…tion Place details are always in English, so München Hauptbahnhof showed as "Munich Central Station" and its board linked only the coach station of that name. The OSM lookup now keeps OSM's own name tag (Place.localName); board requests send the place's OSM object and opened stop; the server links stops by the local name, looked up through the OSM place resolver, and by the opened stop's name, and keys cached links by those names rather than the place id alone.
Medformatik
force-pushed
the
fix/transit-link-local-name
branch
from
October 31, 2026 18:26
c7b0847 to
0e058f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #401. A station's board links its transit stops by the place's name. That name is often a translation: place details always resolve in English, so München Hauptbahnhof shows as "Munich Central Station" whatever the UI language. Transit sources name stops locally, so a search for "Munich Central Station" found only "Munich central bus station", and the board showed FlixBus coaches and no trains. The server also cached each place's links under the place id alone for 24 hours. Whichever name reached it first decided that board for everyone.
Changes:
Places know their local name. The OSM lookup now keeps OSM's own
nametag asPlace.localName(e.g. "München Hauptbahnhof"). It used to drop it as "display only".Board requests carry what links stops better than the shown name. A shared
placeTransitParamsused by all six board hooks sends:osm_id);stop_name, from feat(transit): open a journey's stop as that stop and keep it as the board's main stop #716).The query keys include both.
The server links by the local name. For an
osm_id, the board looks up the local name through theosmplace resolver. The geocoding integration registers that resolver with the operator's Nominatim. It's cached for a day; if it's missing or fails, the board uses the shown name. Linking searches for:Each name keeps the stops it would link on its own. Pooling the names' words would let one name's distinctive words prune the other's stops. The main stop of feat(transit): name the stop a station board departure leaves from #714 is matched against the local name.
Cache identity includes the linking names, not only the place id. A board found by one name can no longer stand in for another.
PlaceTransittakes onePlaceQuery(position, shown name, place id, OSM object, opened stop) instead of growing positional parameters. The routes parse it once.Before (
main, openmapx.com, place "Munich Central Station"): the transit section lists only coaches from the coach station.After: the same place, linked by "München Hauptbahnhof": ICE, S-Bahn and trams.
The after view comes from a local web build of this branch against openmapx.com. A local proxy built the board and line chips with this branch's code. It got the local name from the same Nominatim lookup. For the stop search, it used production's linked stops for each name, so the result shows this branch's choice of names rather than its full search. Some rows in it, such as "DB S3 (Zug-Nr. 6397)" next to "S3", are decorated line names and double listings, which #724 fixes.
Validation:
localName;osm_id.PlaceQuery.check-typespasses forapps/api,apps/webandpackages/core, and Biome is clean.Release and upgrade impact
Product impact: ordinary
No package release: the built
@openmapx/extension-contractsand@openmapx/extension-clipackages are byte-identical tomain(both built and compared); the changed shared code is the webPlacetype, the transit board hooks and the transit integration's dependencies, none of which they ship.