[openstreetmap/openstreetmap-website] Directions interface does not use exact location when selected by right-clicking (#1911)

MareinK notifications at github.com
Fri Jun 22 10:41:03 UTC 2018

#### Issue description
The directions interface does not use the location that I click. Instead it somehow snaps to a nearest 'node' or grid.

#### Steps to reproduce the issue
1. On the main map page, right-click on a location and select 'Directions from here'.
2. Right-click somewhere else and select 'Directions to here'.

#### What's the expected result?
I should get directions from the exact location I clicked first, to the exact location I clicked second.

#### What's the actual result?
I get directions from some point near the location I clicked first, to some point near the location I clicked second.

#### Additional details
- Directions between arbitrary points are not impossible for the engine, as is evidenced by manually clicking and dragging the start and end nodes of the given directions to arbitrary points (they do not snap back then).
- Possibly the cause of this behaviour is [here](https://github.com/openstreetmap/openstreetmap-website/blob/999b9c69e1af252610a2ad338d33d16273fcc22f/app/assets/javascripts/index/contextmenu.js#L22)? (I wanted to try it out but I couldn't get the dev env running)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180622/b8148a6d/attachment.html>

More information about the rails-dev mailing list