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 geocoding doesn't take current location into account #2327

Closed
mtmail opened this issue Jul 25, 2019 · 1 comment
Closed

Directions geocoding doesn't take current location into account #2327

mtmail opened this issue Jul 25, 2019 · 1 comment

Comments

@mtmail
Copy link
Contributor

mtmail commented Jul 25, 2019

Issue

While the search endpoint (GeocoderController) sends the current map bounding box to the geocoder (Nominatim), the geocoding AJAX request in directions.js doesn't.

To reproduce

Normal search

  1. Search for Manchester https://www.openstreetmap.org/search?query=manchester
  2. Search for King Street https://www.openstreetmap.org/search?query=king+street
  3. a King Street in Manchester is found (https://www.openstreetmap.org/way/4961636)

vs

Directions search

  1. Search for Manchester https://www.openstreetmap.org/search?query=manchester
  2. Open directions dialog, it shows start and destination fields. Start is now prefilled with Manchester, Greater Manchester, North West England, England, United Kingdom
  3. In the destination field type in "King Street" and press [TAB] or unfocus the input field
  4. a King Street in Derby is found, far away

Expected behavior

King Street near Manchester should be set as destination.

@tomhughes
Copy link
Member

The only thing I wonder about here is that it's probably quite common for one of the end points not to be in view, or even nearby, when setting up a route...

That said this does only give preference to locations near the view box so it's probably reasonable.

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 a pull request may close this issue.

2 participants