Hi, I have a map that uses Mike W's car trip reading from xml. The map is here: http://www.xelawho.com/map/moving.htm
But what I want is for if the user clicks the start button again, for the car to go back to the start. Instead it gets stuck wiggling around in the same spot while the map keeps panning, following the line. I thought this was a javascript question - stop a funtion, clear the variables and restart, so when I got stuck I asked around on the javascript forums. They had a go at it, got stuck too, and referred me back to the API. I figured it might be getting stuck in a loop, so I made a new function to try to clear everything and then call the startAnimation function., But the only thing that seems to have any effect there is map.clearOverlays(); which does get another car on the map, but doesn't get rid of the first one. You can see how that runs here: http://www.xelawho.com/map/moving3.htm After that I'm kind of out of ideas. I know that the "p" variable in the animate(d) function is important as it sets where the map pans to and where the marker is. I just can't figure out how to tell it to forget about the first one and concentrate on the new one. Or if this is the way to go about this. Any suggestions most welcome. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To post to this group, send email to google-maps-...@googlegroups.com. To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.