I had tried this before but didn't work, now that you said that it was the correct thing to do, I took a deep look into my load function and found another function call that was ruining the load!
Thanks a lot, Mike, it really helped! On 5 ago, 12:23, Mike Williams <[email protected]> wrote: > A tight loop triggering "click" events is just as fast as a tight loop > performing the GDirection calls. > > What you need to do is listen for the GDirection "load" event, and issue > the next GDirections call from there. In order to do that, you'll > probably need to have a global variable where you remember how far > through the points array you are. > > GEvent.addListener(GDir1,"load",function() { > nextpoint += 1; > if (nextpoint < points.length - 1) { > GDir1.loadFromWaypoints([points[nextpoint], points[nextpoint+1]], { > getPolyline:true > }); > } > > }); > > -- > Mike Williamshttp://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 -~----------~----~----~----~------~----~------~--~---
