Smooth Route Animation in Google Maps: panTo vs. setCenter
November 26, 2007In my first attempt to animate a route on Google Maps, I used the GMap2.setCenter method. This provided for a spotty animation:
As the marker moved along the route, the background map (as you can see) would often not render. Changing to use GMap2.panTo instead of the GMap2.setCenter method fixed this problem and the flickering of the route problem that I was seeing on Safari.
Now the route animation of the Sheldon Road Trail looks a lot better. So does other routes, e.g. the Pebble Beach route, Kenndey/Shannon/Hicks Roads route, or the Stevens Creek Reservoir route.
