Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Possibility to enter two (or more) stations / find out fastest half-way meeting spot #9

Open
mandrasch opened this issue Oct 30, 2021 · 3 comments

Comments

@mandrasch
Copy link

Hey,

amazing online tool, thanks for providing it! 馃憤

I just had a quick idea for displaying / comparing the results of two (or more) locations to get the fastest half-way meeting spot for friends in different cities. Guess the idea is obvious, but I wanted to open it up here anyway (for anyone interested).

Took a first look in the source code. Got it running using my own mapbox.com-API key. Just wondered how do you develop locally? Found no npm run start, I ran npm run build after changes and served the index.html via http-server ..

In a first quick try I managed to persist locations by declaring const geojson ... globally and using geojson.features.push(...features) instead of geojson.features = features.

image
Example Edinburgh (Scotland) and Gmunden - no overlap

But of course the fetch request must be extended to compare the results as far as I understand it (https://github.com/juliuste/direkt.bahn.guru/blob/main/src/index.js#L173).

If I find time to dive into this, I'll update this issue of course.

If this is not within your scope, sorry for the interruption. :)

Best regards,
Matthias

@katrinleinweber
Copy link

katrinleinweber commented Jun 1, 2022

I've prototyped a script to do this in the shell Ruby.

+1 for an official, 2nd search bar (and then only displaying the intersect). That would be so useful for planning trips together :-)

@katrinleinweber
Copy link

katrinleinweber commented Nov 7, 2022

I've improved the prototype 鈽濓笍 with better explanations & output formatting. Maybe it should be a Ruby gem?

@romanboehm
Copy link

I also found that functionality useful. Since I wanted to have it right away and since I'm not very JavaScript-literate, I put together a plain Java script (heh): https://github.com/romanboehm/destinations

This can handle an arbitrary number of locations and offers limited parametrization, e.g. max duration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants