> How can I return "drivingDistanceKilometers" after event load to not > be undefined?
You can't. The function is a callback function for an asynchronous service. When you call an asynchronous service, you only fire off the request and the rest of your code continues executing. Eventually the data comes back, and the callback function that you defined runs, but it cannot 'return' to anywhere in your code. If you want to do something with 'drivingDistanceKilometers', you must do it within the callback function. -- 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.
