Tom Chubb wrote:
That's all way above my head, but I think I'll be able to understand it after a strong coffee!
I should point out that this is really just trig and is only an approximate distance as the crow flies. Not even sure if it takes the curvature of the earth into consideration, but it's probably "good enough" for most things.
Any idea how you get the co-ords from the UK Postcode though?
Well that's tricky. It depends on how google do it's geodata service now. In the past they did not offer a postcode lookup service for the UK, but I've not looked for a while and this may now be possible.
When I had to solve this problem a few years ago we bought in a database of UK postcodes. IIRC it's about £1k/annum via Bartholomew but there are plenty people offering this now.
Col. -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php