[OSM-dev] Name finder for the main OSM page?
David Earl
david at frankieandshadow.com
Sat Aug 25 15:35:51 BST 2007
On 24/08/2007 00:21, Tom Hughes wrote:
> In message <46B987A7.4060107 at frankieandshadow.com>
> David Earl <david at frankieandshadow.com> wrote:
>
>> When you're zoomed in you often lose the context of where you are. We
>> could have a "Where am I" button. This would consult the name finder
>> with the query "places near <lat>,<lon>" where <lat>,<lon> comes from
>> the current map centre, and show the results in a panel like the search
>> panel (linked in the same way).
>>
>> You'd need to filter the results to show only those with non-zero rank
>> (to exclude results like "Ingham Place" matching the word place), so
>> you'd get a list like
>> 1km west of Teversham
>> 4km east if Cambridge
>> 24km south of Ely
>> ...
>
> I've been playing with this using the three queries that your new
> version uses and I've found a couple of issues...
>
> The "towns near" and "places near" queries generally behave fairly
> sensibly, and give things near "requestedplace" which has the lat
> and lon I supplied.
>
> The "cities near" query does not do this however, and gives me all
> sorts of wierd results which are relative to other places and not
> the lat and lon I gave. My test case of 51.76,0.0 which is just north
> of London gives me Bristol as the first result!
>
> A second problem is that it doesn't cope with wrapping around the
> zero meridian - as you can probably guess from that test case I live
> about half a mile or so from the meridian and I find that if I'm to
> the east of it I only find towns to the east and vice verse when I'm
> to the west of it.
I've now fixed this. It was a problem of an inconsistency between which
region I put places etc in when indexing and which I think they are in
when searching for all negtive longitudes. This would also have affected
determination of nearby places in general searching - not specific to
this kind of search.
But Tom, did you see this message
http://lists.openstreetmap.org/pipermail/talk/2007-August/017078.html
and in particular how I've selectively done "where am I" and a little
inset map to give the sense of direction. It's all in Javascript (except
the actual search). (Also, re postcodes).
Also, your current implementation gets west/east mixed up, no doubt due
to my angles starting on the x-axis.
David
More information about the dev
mailing list