On Mar 26, 11:28 am, Bill <[email protected]> wrote: > Hi > I am trying to build an app for which i need the time for a route. I > can not seem to find the right way to get the info. > When I use the getNumRoutes() method of GDirections I get an > undefined value. > > Here is a link toi the web page where I am getting the > errorhttp://www.optwise.com/protected/mapletTry1.htm >
GDirections is asynchronous. You can't use the results until it returns the data from the server. >From Mike Williams' tutorial: Part 2 Asynchronous I/O http://econym.org.uk/gmap/async.htm also look at his examples that use the GDirections object. -- Larry --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
