As I said, if you talk "long distances", the earth is not a "plain"
field.  If you'd rather have him use Haversines formula, why not quote
it here.  Otherwise, for distances under a few hundred miles (other
than at Latitude 90 or -90) my formula should work (assume latitude is
"y" and longitude is "x").

On Sep 20, 7:59 pm, Rossko <[email protected]> wrote:
> > distance = square root ( (x2 - x1) squared + (y2-y1) squared ))
>
> Sure, but that doesn't work well for lat/long coordinates. Haversine
> Formula is generally used.
>
> > Note that you need to do this arithmetic for every point that's within
> > the square (lowest x, lowest y) to (highest x, highest y), but you can
> > do this query in SQL and then eliminate the ones outside the circle.
>
> Yes, if searching a large database a simple "bounding box" query can
> be used to give candidates for more complicated further testing.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to