traewelldroid icon indicating copy to clipboard operation
traewelldroid copied to clipboard

Suchfunktion schlecht/funktioniert nicht

Open Moritz-Schmidt opened this issue 1 year ago • 2 comments

Beschreibung In der Haltestellensuche lassen sich manche Haltestellen sehr schlecht bzw gar nicht finden. Z.B. der Ernst-Reuter-Platz (U), Berlin Außerdem wäre es toll, in den Suchergebnissen scrollen zu können (mehr als 5 Ergebnisse)

Expected behavior Suchergebnisse wie auf traewelling.de

Screenshots Suchergebnisse Traewelldroid: Screenshot_20240109-170314~2.png

Suchergebnisse Traewelling: Screenshot_20240109-170322~2.png

Smartphone:

  • Device: Pixel 6
  • OS: Android 14
  • Version: v2.4.2-play (137)

Moritz-Schmidt avatar Jan 09 '24 16:01 Moritz-Schmidt

I honestly have no idea how this is happening because Träwelldroid is using the exact same search method as the Träwelling Web UI. I'll think about adding more search options...

jheubuch avatar Jan 10 '24 17:01 jheubuch

I may have an idea why the results are differnet:

the Request: https://traewelling.de/transport/train/autocomplete/Ernst-Reuter-Platz gives following result:

[{"ibnr":104624,"rilIdentifier":null,"name":"Ernst-Reuter-Schule, Dietzenbach"},
{"ibnr":112036,"rilIdentifier":null,"name":"Ernst-Reuter-Stra\u00dfe, R\u00fcsselsheim"},
{"ibnr":506875,"rilIdentifier":null,"name":"Ernst-Reuter-Schule, Ha\u00dfloch"},
{"ibnr":561263,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Stuttgart"},
{"ibnr":620433,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Dachau"},
{"ibnr":677079,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Forchheim (Oberfranken)"},
{"ibnr":692231,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Neum\u00fcnster"},
{"ibnr":731013,"rilIdentifier":null,"name":"Ernst-Reuter-Platz (U), Berlin"},
{"ibnr":769548,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Bremerhaven"},
{"ibnr":887594,"rilIdentifier":null,"name":"Ernst-Reuter-Stra\u00dfe, Helmstedt"}]

The first 5 results are the ones displayed on traewelldroid while traewelling additionally does some JS stuff with the results including using a package called Awesomplete: https://github.com/Traewelling/traewelling/blob/develop/resources/js/components/station-autocomplete.js

This is probably the relevant difference.

Moritz-Schmidt avatar Jan 10 '24 21:01 Moritz-Schmidt