juliuste / direkt.bahn.guru

All direct long-distance railway connections for cities in and beyond central Europe.
https://direkt.bahn.guru
GNU General Public License v3.0
368 stars 24 forks source link

Selecting the means of transport #2

Closed sebkur closed 2 years ago

sebkur commented 4 years ago

How about an option to select the means of transport to take into account. I'd like to see this in order to show reachability with regional trains only. Would it be hard to implement that?

MartinEnders commented 2 years ago

This feature would be super cool in Germany for the 9€ ticket which is available from June to August. The 9€ ticket allows to travel across Germany in regional trains but not in ICE, IC, and EC trains.

PS: Your website is really great 👍

juliuste commented 2 years ago

Thanks for the suggestion! The hurdle for implementing this is similar to that for #4 (see my comment there): Adding such a filter mechanism to the API is really straight-forward, but exposing that filter to the users in the frontend is a bit of work. I will look into that in the future, but if someone else wants to help with the UI part, I'd also be grateful 🙂

juliuste commented 2 years ago

Since this issue was raised multiple times over the last few days, I changed my mind and spent a few hours to quickly cobble something together in really basic way. There should now be a filter icon below the search bar, allowing users to switch between all transit and local-only. Note that (because of technical restrictions, once again) some trains might be wrongly categorized as local. I already filtered some of these out in the backend (e.g. Flixtrain), but since these exceptions need to be hard-coded on a case-by-case basis, I probably missed some.

I'll close this issue for now, but please comment/re-open if something is broken, or if I misunderstood the original feature request.

MartinEnders commented 2 years ago

Thank you @juliuste

sebkur commented 2 years ago

Thanks for implementing this!