Monday, September 6, 2010

Distance for multiple locaations

Hi all,

I want to calulate the distance from "A" to an array of points like
P,Q,R,S.
I want the distance from A to P
I want the distance from A to Q
I want the distance from A to R etc;

I used this method to get the distance
geocoder = new GClientGeocoder();
gDir = new GDirections();
GEvent.addListener(gDir, "load", function() {
var drivingDistanceMiles = (gDir.getDistance().meters /
1609.344).toFixed(1);

But it is an asynchronous request it gave me only the distance between
last pair of points.
How to get this result using gmaps api?
Please help me in this issue

Regards,
Siva Myneni

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate