[OSM-dev] Name finder for the main OSM page?

David Earl david at frankieandshadow.com
Wed Aug 8 09:52:37 BST 2007


> 
> Somebody did suggest ordering the results by distance from the current
> map position as well.

If (in the name finder) you qualify the name search (comma or near, as 
in "Regent Steet, Cambridge") the results are returned in order of 
distance from the place you ask for, and I think it is important to keep 
that.

If you don't qualify the name, the results are effectively random. If 
you pattern match for no comma or near and append "near lat,lon" it will 
do the ordering you suggest, and that might be quite a good idea. 
Obviously the ordering has to be done in the name finder not by sorting 
the results because there may be results that aren't returned which are 
closer to the map centre than any of the effectively random results.

With no other qualification, it returns exact matches in preference to 
non exact ones, so the downside of this is if you ask for "Oakham" for 
example, you might risk getting hundreds of (well 30, anyway) Oakham 
Terraces in preference to the town of Oakham.

David





More information about the dev mailing list