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

David Earl david at frankieandshadow.com
Wed Aug 8 00:09:12 BST 2007


On 07/08/2007 19:07, Ulf Lamping wrote:
> Tom Hughes schrieb:
>> In message <46B31542.2070906 at frankieandshadow.com>
>>           David Earl <david at frankieandshadow.com> wrote
>>> 2. The box on the osm homepage could call the XML interface to the name
>>> finder, extract the results (which includes the descriptive strings you
>>> get back now on the name finder page) and go to the lat/lon provided.
>>>     
>> This is now in place - in fact the search has been completely reworked
>> with extra added ajaxiness and the name finder is now one of the sources
>> it looks at it.
>>
>> There is now a single search box in the left hand navigation bar and
>> when something is entered a results pane opens listing the results and
>> allowing you to jump to one of your choice.
>>   
> The whole thing is looking/working much better now, I also like the idea 
> of opening a results pane!
> 
> Some nitpicking:
> - if only one result is returned, shouldn't the search directly show 
> this result and ommit opening a result pane?
> - the name finder shows a small arrow on the map to indicate the 
> currently searched item, which can be useful on a "crowded map" with 
> lot's of streets

Excellent, thank you Tom.

A couple of easy suggestions: since you already have the info in your 
hand from the name finder XML you could put a TITLE tag in the <A ...> 
with the full text of the context that I return to you, so if you hover 
over it you'll get it all, without taking up more space.

Secondly, it isn't clear to a visitor that they can qualify the search 
by place to narrow the results significantly, or indeed a street name at 
all. I suggest under the search box
"examples: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ', or 'post 
offices near Lünen' <a href='wiki page'>more examples...</a>"

Thirdly, the first hit is very often the right one, so if you recenter 
the map at the coordinates and zoom given in the name finder XML, or 
whatever equivalent is appropriate if geonames gives the only hit, etc. 
I think this could be done irrespective of how many results are returned.

Re Ulf's mention of the arrow, this was something I added to namefinder 
a couple of weeks ago. It's a very simple layer. I'm sure you know how 
to do this, but feel free to borrow the code for this from 
frankieandshadow.com. I offset the arrow a small amount up and left to 
avoid clashing with the name on the map.

BTW, I'll be adding a second parameter to the search string this week 
that let's you control the max number of results - 30 is a bit much 
sometimes. I'll let you know when this is ready.

David





More information about the dev mailing list