You perform a GXmlHttp to fetch some point co-ordinates.
This will happen asynchronously; that means the data you have asked
for will turn up later - much later in computer terms.
Meantime, javascript execution continues ...
Next you perform a
dirn.loadFromWaypoints(points, {getPolyline:true});
where points is an array populated by the previous GXmlHttp section.
Now, have a think; what will the contents of the points array be when
you set up the loadFromWaypoints call?
Hint : It is not yet 'later', the data has not come back yet from the
GXmlHttp call.
If the loadFromWaypoints relies on data from the GXmlHttp call, it
MUST be placed within the GXmlHttp callback code.
cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---