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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directions: introduce driving directions support 🎉 #515

Merged
merged 22 commits into from
Sep 19, 2024
Merged

Directions: introduce driving directions support 🎉 #515

merged 22 commits into from
Sep 19, 2024

Conversation

zbycz
Copy link
Owner

@zbycz zbycz commented Sep 5, 2024

PREVIEW: live on https://osmapp.org
Waiting for a confirmation from BRouter API, until then the API used is Graphhopper freemium. In future there may be an option to choose preferred router and more routing profiles.

Screenshot 2024-09-13 at 17 49 10

#31

TODO:

  • refactor
  • homepage panel should be hidden
  • handle 400 when far from roads
  • loading indicator
  • inteligent padding

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Sep 19, 2024 10:31am

@zbycz zbycz changed the title Routing: introduce DirectionsBox Directions: introduce routing support 🎉 Sep 13, 2024
@zbycz zbycz changed the title Directions: introduce routing support 🎉 Directions: introduce driving directions support 🎉 Sep 13, 2024
@zbycz zbycz marked this pull request as ready for review September 13, 2024 15:50
@zbycz zbycz merged commit e06e63e into master Sep 19, 2024
2 checks passed
@zbycz zbycz deleted the routing branch September 19, 2024 10:32
Copy link

sentry-io bot commented Sep 19, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: Cannot read properties of undefined (reading 'coordinates') /[[...all]] View Issue

Did you find this useful? React with a 👍 or 👎

@amenk
Copy link
Contributor

amenk commented Sep 20, 2024

Really nice - incredible! 🎉 🎉

Am I assuming correctly that brouter is only for bike routes?

Currently the distances show in miles / feet. Is this intended or based on the browser locale?
I think we should prefer metric units or make it possible to switch or check if the users uses en-US in the browser.

@zbycz
Copy link
Owner Author

zbycz commented Sep 20, 2024

@amenk - Thanks!! I think it was very much missing feature in OsmAPP even though it was not that hard to implement.

No, brouter is not used at the moment – it is prepared in the code for an easy switch. I read that their main API is not to be used publicly, so I am waiting for their confirmation. Meanwhile we use Graphopper, which offers 500 routings/day which should be enough for OsmAPP currently. I think.. 🤔

You can change the units by clicking the Scale in the bottom left corner. It changes the units in the app as whole. This should really move to UserSettings! 😅 -> #572

@amenk
Copy link
Contributor

amenk commented Sep 20, 2024

Thanks.

I understand that brouter is currently not used, but I was assuming that, if it's used it's only for bike routing.

Did you also consider https://openrouteservice.org/plans/ ? They have bigger limits than GraphHopper and an official non-profit plan.

@zbycz
Copy link
Owner Author

zbycz commented Sep 20, 2024

I see the confusion now. If we switched handleRouting to BRouter, it would be used for all modes. The getPaint code only enhances the bike routes on BRouter to highlight steep ascents. I didn't implement elevation from Graphopper yet.

I didn't know openrouteservice, thanks. That looks promising. I expect OsmAPP can easily implement more router engines and just let the user choose their favourites in some submenu.

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

Successfully merging this pull request may close these issues.

2 participants