ewoken / Leaflet.MovingMarker

A Leaflet plug-in to create moving marker
MIT License
342 stars 177 forks source link

Adjust animation speed #5

Open fnogatz opened 9 years ago

fnogatz commented 9 years ago

I've added a marker.setSpeed(number) option to adjust the speed of the animation. setSpeed(2) is double speed, setSpeed(1) is normal. This method works both on running markers and paused ones. Examples were added.

ewoken commented 8 years ago

I think that it is user's responsibility, isn't it ? :-)

fnogatz commented 8 years ago

I would only agree if it is trivial to implement without touching core. Because adjusting speed is a typical use case, I created this PR. But it's up to you.