Daniel It looks like your stack of document.writes at the bottom are called as soon as your for loop finishes, which could be before some (or all) of the asynchonous directionsService requests complete. You need to assure that each of your directionsService requests have completed (not just returned; the call to directionsService returns immediately) before you proceed to display the data.
You could nest all four directionsService requests (calling the next one from within the function body only once the preceding request completes). Or you could set a flag when the request completes, and then wait for all four flags before proceeding. The elegance of your solution does depend on your precise implementation, another reason to post a link to your code. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
