The geocoder is asynchronous. When you make the GDirections call immediately after sending the geocoder requests, the replies won't have come back yet, so geocodes1[] and geocodes2[] will still be empty.
Either perform your GDirections call after all the geocoder replies have come back, or use the address strings instead of the coordinates in the GDirections calls. -- Mike Williams http://econym.org.uk/gmap -- 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.
