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

Support for permalinks #145

Open
kresp0 opened this issue Sep 10, 2022 · 1 comment
Open

Support for permalinks #145

kresp0 opened this issue Sep 10, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@kresp0
Copy link
Contributor

kresp0 commented Sep 10, 2022

It would be nice to be able to share the current map view and a specific route result with a permalink.

@ellenhp
Copy link
Member

ellenhp commented Sep 10, 2022

I do intend to support this eventually with some caveats. I don't want to add a URL-shortening service to Headway because I'm trying to make sure the backend doesn't store any user data.

Instead, I'm planning on putting the route endpoints and a hash of the selected route's polyline in the URL. When the link is opened, a routing request is made to get a list of routes, and all of the routes are checked against the hash in the URL. If one of the hashes matches, that alternate is automatically selected. Otherwise, an error is shown.

Since valhalla doesn't have access to traffic or any other dynamic data, this error will happen mostly in areas where Valhalla knows about road closures that are based on time of day.

@ellenhp ellenhp added the enhancement New feature or request label Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants