[GIS] Moving marker smoothly along two GPS coordinates

animationgoogle maps

I am trying to animate a marker from one GPS coordinate to another. I am currently using Google Maps to achieve this and, although my algorithm seems right, Google Maps is doing a poor job at converting the GPS position to the right pixel on the map, which makes the animation not so smooth when the map is zoomed out. Zoomed in, it is very smooth and that's why I suspect the "zig zag" is caused by Google doing a poor LatLng->pixel conversion.

The best solution would be for me to deal directly with the markers (x,y) pixel coordinates but there is unfortunately no public method for assigning pixel location to a marker.

The code is available here: http://dev.syskall.com/map/

How would you make the animation smoother when zoomed out? Alternatively, I would be interested in using an equivalent to Google Maps that would let me accomplish what I'm trying to do if it isn't possible with Google Maps.

PS: I am not sure if this is the right place to ask my question, let me know if it isn't the case.

Best Answer

v2 http://econym.org.uk/gmap/example_cartrip.htm

v3 http://plebeosaur.us/etc/map/ (works best with iphone) you can use your raw gps data.

tip - use actual geographical coordinates rather than pixel coordinates as they are rounded up (2 decimal places) & geographical coordinates uses 6 d.p.