On Sep 14, 4:14 am, visit <[email protected]> wrote: > yeah.. > > In fact I want to get some "two addresses"'s distance > like A>B A>C A>D A>E ....etc > and find the min distance > > I can't use loop to do this, > so now I want to use GDirections's load method > like load(from:A to:B to:A to:C to:A to:D.....) > and then get the odd route's distance... > If I get those distance I'll know the min route.... > > But some one told me that load method could only load 25 address... > Is that true?
Only 25 waypoints in a GDirections call: http://code.google.com/apis/maps/documentation/reference.html#GDirections.loadFromWaypoints > > I think my problem like this... > > http://groups.google.com/group/google-maps-api/browse_thread/thread/f... > > thanks for your replying.... > > On Sep 14, 4:02 am, "[email protected]" <[email protected]> > wrote: > > > On Sep 13, 9:38 am, visit <[email protected]> wrote: > > > > Hi,Larry > > > > thanks for your help... > > > > I'll read the guide!! > > > > > You can. But it probably won't work. GDirections is asynchronous: > > > > Javascript Concepts > > > > Part 2 Asynchronous I/Ohttp://econym.org.uk/gmap/async.htm > > > > > You need to wait for the results to come back from the previous > > > > request before sending the next. > > > > ok..I'll think another way... > > > > > > to get two addresses's distance? > > > > > > And > > > > > > "GEvent. (gdir, "load", onGDirectionsLoad);" > > > > > > if I could use onGDirectionsLoad to load two addresses and then get > > > > > the distance by getDistance().meters? > > > > > I don't see onGDirectionsLoad in the documentation. > > > > Sorry, onGDirectionsLoad is my function's name > > > I just want to know if I could use the same function to load(A,B) and > > > getDistance()? > > > Sure, if you code it to do that. But it sound to me like you are > > confusing the sequencing. When you make the request to the server, > > you provide the addresses. When the data is returned you can get call > > getDistance().meters on the GDirections object you made the request > > with. > > > -- Larry > > > > > > I need your help...thanks- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text -- 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 -~----------~----~----~----~------~----~------~--~---
