Sort search results by distance to map center

Bug #1272929 reported by Alan Pope 🍺🐧🐱 🦄
10
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.

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :
ybon (yohanboniface)
Changed in osmtouch:
milestone: none → 0.1.0
status: New → Confirmed
Revision history for this message
ybon (yohanboniface) wrote :

@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.

Changed in osmtouch:
status: Confirmed → In Progress
ybon (yohanboniface)
summary: - Search should use similar bounding as POI
+ Sort search results by distance to map center
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.