Re: Best way to Animate GPS tracks with a marker or HTML5 shape

296 views
Skip to first unread message
Message has been deleted

Bryan McBride

unread,
Jan 22, 2013, 11:32:02 AM1/22/13
to leafl...@googlegroups.com
Have a look at the Leaflet.AnimatedMarker plugin: https://github.com/openplans/Leaflet.AnimatedMarker.

BRYAN

On Tuesday, January 22, 2013 2:16:39 AM UTC-5, Antilogic wrote:
I'm new to leaflet, looking for some advice.  

I'd like to create an animation of a marker of some sort (for example, an html5 filled arc or shape) to replay GPS tracks on a map.  I may want several animated markers and I want to stay flexible with the behavior and performance.  Can anyone recommend a good way to go about creating this type of animation?   

It looks like I could create a canvas layer (L.TileLayer.Canvas) and draw on it using a technique for linear animation (e.g. http://www.html5canvastutorials.com/advanced/html5-canvas-linear-motion-animation/), but I'm not yet sure if this works, or if I need to call redraw() and how the performance would be.  Or I could try and make customer markers and move them by setting the lat/lon on them at some interval.  

Has anyone come across this and can recommend a solution (above ideas or other)?  Ideally as I change zoom levels, the animation will "scale" and have good performance.  Thanks!
Reply all
Reply to author
Forward
0 new messages