[OSM-dev] Name finder for the main OSM page?
Tom Hughes
tom at compton.nu
Wed Aug 8 01:04:18 BST 2007
In message <46B8FB98.7030002 at frankieandshadow.com>
David Earl <david at frankieandshadow.com> wrote:
> 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.
I tried it, but (a) the HTML tags get in the way (though I can probably
strip those) and (b) at least for Firefox it chops off the title at about
sixty characters or something and adds "..." on the end.
> 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>"
Space might be an issue - the search box is already quite a long way
down if you aren't logged in. Maybe a link? I need to put the key link
back anyway.
> 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.
Interesting idea... I'll have a think about it.
> 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.
We already had the code to support it, so it's in now.
> 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.
I think I actually upped the geocoder.org query to get 20 instead
of 10 results as part of this change...
Somebody did suggest ordering the results by distance from the current
map position as well.
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the dev
mailing list