> Actually, because its longitude/latitude on the curved surface of our
lovely planet, its actually slightly more complicated!

Thanks for the correction. A quick glance at the Google API reveals a
function for this as well:

GLatLng.distanceFrom(other, radius?) -
Returns the distance, in meters, from this point to the given point. By
default, this distance is calculated given the default equatorial earth
radius of 6378137 meters. The earth is approximated as a sphere, hence the
distance could be off as much as 0.3%, especially in the polar extremes. You
may also pass an optional radius  argument to calculate distances between
GLatLng coordinates on spheres of a different radius than earth. (Since
2.89)
http://code.google.com/apis/maps/documentation/reference.html#GLatLng



"It is not the mountain we conquer but ourselves" -- Sir Edmund Hillary
(1919 - 2008)


On Thu, Nov 6, 2008 at 6:51 PM, Matt Hammond <[EMAIL PROTECTED]>wrote:

> Actually, because its longitude/latitude on the curved surface of our
> lovely planet, its actually slightly more complicated!
>
>    http://www.movable-type.co.uk/scripts/latlong.html
>
> That said, if you're just doing the UK, then you can probably get a close
> enough answer for your purposes by approximating longitudes and latitudes to
> being X-Y coordinates on a flat surface. We aren't that large a country
> after all!
>
> However you would need to put a scaling factor in to map n degrees of
> longitude/latitude to approximate numbers of metres. Because the UK is not
> at the equator, 1 degree of longitude is going to be a shorter distance (I
> think thats correct?) than one degree of latitude.
>
>
>
> Matt
>
>
> On Thu, 06 Nov 2008 13:21:27 -0000, Aleem B <[EMAIL PROTECTED]> wrote:
>
>  since you are going this route, this might help to calculate distance
>> between two points:
>> http://www.dreamincode.net/forums/showtopic59488.htm
>>
>> would also be helpful to others if you posted a link to the updated
>> location
>> mappings with lat/long after you parse the feeds.
>>
>>
>> On Thu, Nov 6, 2008 at 5:43 PM, Richard Garside <
>> [EMAIL PROTECTED]> wrote:
>>
>>  Unless the locations change, then you only need to do it once. Or if they
>>> do, then you shouldn't have to renew it very often.
>>>
>>
>
>
> --
> | Matt Hammond
> | Research Engineer, FM&T, BBC, Kingswood Warren, Tadworth, Surrey, UK
> | http://www.bbc.co.uk/rd/
> -
> Sent via the backstage.bbc.co.uk developer discussion group.  To
> unsubscribe, please send an email to [EMAIL PROTECTED] with
>  unsubscribe backstage-developer [your email] as the message.
>

Reply via email to