> Kindly have a look athttps://developer.mozilla.org/en/window.setTimeoutthe > first version of the syntax takes 3rd argument which are the parameters for > the to be called function.
You're right. I'm so used to cross-browser javascript that I've never seen it. Discussion on cross-browser method http://www.makemineatriple.com/2007/10/passing-parameters-to-a-function-called-with-settimeout which comes with a bonus in that it will capture your non-global scope parameter for later, when the function runs. You need to re-think your logic, I think you have a loop that cycles through your line segments setting up setTimeouts for 5 seconds in the future. setTimout does not pause the flow of execution, so the loop carries on with the next segment. After the loop has finished processing all segments, and 5 seconds have passed, all the setTimeouts trigger at almost the same time. You won't get an animation effect. You need to trigger the next setTimeout after the previous one has actioned, or use setInterval -- 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.
