Sort search results by distance to map center
Bug #1272929 reported by
Alan Pope 🍺🐧🐱 🦄
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OSMTouch |
In Progress
|
Undecided
|
Unassigned |
Bug Description
If I zoom in on a part of my home town and search for "Ship" (the Ship Inn is a pub in the town) I see results from all around the world. the first is in Quebec (many miles away and over an ocean) followed by a number in my own country, but the pub in my town isn't shown. It is in the database because if I search for "ship inn, farnborough" it comes up.
I would expect the list to be sorted by location, nearest first, especially if I'm already zoomed in on a town.
Changed in osmtouch: | |
milestone: | none → 0.1.0 |
status: | New → Confirmed |
summary: |
- Search should use similar bounding as POI + Sort search results by distance to map center |
To post a comment you must log in.
@alan, I've added the `viewbox` parameter to the Nominatim call, which gives preferences to results inside the current map view. But if there is no result inside the bbox, results outside are retrieved.
The tricky part is that there are some ponderations involved in Nominatim scoring results, so it may appear that a result outside the bbox appears as more relevent than another one inside, maybe because it's a bigger city, or the name is the exact search string, etc.
Can you take two minutes and test on trunk and tell me how you feel it?
The fact is that I'm afraid that I've not many options to make this better since we rely on Nominatim.