[openstreetmap/openstreetmap-website] Don't crop coordinates when replacing directions url (PR #5794)

Anton Khorev notifications at github.com
Wed Mar 12 00:21:48 UTC 2025


Here's some strange behavior:

1. Zoom in close enough.
2. Build a route, like [this one](https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=48.861246%2C2.345002%3B48.862012%2C2.341391#map=18/48.861833/2.343210).
3. Look at the browser location bar. It's going to contain the coordinates of endpoints. Notice that they have 5-6 digits after `.`.
4. Zoom out to see the entire planet.
5. Click *Go* to rebuild the route. This will zoom you back to the same route.
6. Look at the location bar again. Now the coordinates have only one digit after after `.` and they are the same for starting/ending points. That can't be right.
7. Click *Reload* and you'll be taken to some other place and the route will be gone.


You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5794

-- Commit Summary --

  * Don't crop coordinates when replacing directions url

-- File Changes --

    M app/assets/javascripts/index/directions.js (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5794.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5794.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5794
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5794 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250311/f0ac6987/attachment.htm>


More information about the rails-dev mailing list