On Sep 30, 2:04 pm, "Al Caughey" <[EMAIL PROTECTED]> wrote:
> I suspect that the GLength method will give the straight line distance
> between the points rather than the great-circle distance (i.e., it'll ignore
> curvature of the earth)
> (correct me if I'm wrong...).   I didn't know about the distanceFrom method
> when I implemented the Haversine formula).

See this thread for details:
http://groups.google.com/group/Google-Maps-API/browse_frm/thread/8a28bb83e3f52437/b4c43d2eed278672

  -- Larry

>
> Al
>
> On Tue, Sep 30, 2008 at 6:56 AM, Black Fog
> <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > @feroz
>
> > try to store the two points (whose distance you want to calculate) as
> > a simple linestring in a database with spatial features and make a
> > simple query for distance.
>
> > in mysql for example it is just this sql query commands:
> > mysql> SET @ls = 'LineString(1 1,2 2,3 3)';
> > mysql> SELECT GLength(GeomFromText(@ls));
>
> >http://dev.mysql.com/doc/refman/5.0/en/linestring-property-functions....
>
> > On 30 Sep., 09:30, Mike Williams <[EMAIL PROTECTED]> wrote:
> > > Wasn't it Indula Sumithraarachchi who wrote:
>
> > > >If browse the API you might find this
>
> > > >  var pointA = new GLatLng(d_lat, d_lng);
> > > >  var pointB = new GLatLng(d_lat, d_lng);
> > > >  distance = pointA.distanceFrom(pointB)/1000);
> > > >//Divide by 1000 to turn m to km
>
> > > But Feroz can't use that in a non-web application.
>
> > > --http://econym.org.uk/gmap
> > > The Blackpool Community Church Javascript Team- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to