[openstreetmap/openstreetmap-website] Add demo links for routing engine directions Fixes #6387 (PR #6693)
Areeb Siddiqui
notifications at github.com
Fri Jan 9 05:11:30 UTC 2026
<img width="1917" height="875" alt="Screenshot 2026-01-09 094808" src="https://github.com/user-attachments/assets/42e602d1-af51-4d1b-ab61-6bfdc3c6a74d" />
<!--
Please read the contributing guidelines before making a PR:
https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md
Pay particular attention to the section on how to present PRs:
https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#pull-requests
-->
### Description
Changes:
- Extend the routes variable to include selected routing mode and engine
- Introduce a getDemoLink helper function to generate routing engine demo URLs with appropriate parameters
- Add a demo link to the directions view (directions/show.html.erb) so users can easily open the route in the external routing engine demo
- The changes have been implemented as suggested in [this](https://github.com/openstreetmap/openstreetmap-website/issues/5224#issuecomment-2365144537) comment
### How has this been tested?
Tested locally using the Docker development environment.
- Verified directions page renders correctly for different routing modes and engines
- Confirmed the generated demo link opens the selected routing engine’s demo page with equivalent route parameters
- Ran Rails test suite with system tests skipped
- Ran RuboCop, ESLint, and ERB lint checks and fixed all reported issues
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/6693
-- Commit Summary --
* Add demo links for routing engine directions
-- File Changes --
M app/assets/javascripts/index/directions-route-output.js (36)
M app/assets/javascripts/index/directions.js (7)
M app/views/directions/show.html.erb (3)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/6693.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6693.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6693
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6693 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260108/0c810f9e/attachment.htm>
More information about the rails-dev
mailing list