Igor-Vladyka / leaflet.motion

A simple tool to animate polylines and polygons in different way
https://igor-vladyka.github.io/leaflet.motion/
MIT License
207 stars 44 forks source link

Animation Speed Units #5

Closed HenriSchulte closed 5 years ago

HenriSchulte commented 5 years ago

I have been wondering over inconsistencies in the units animation speed. In the Readme, motionOptions.speed is described explicitly as "Motion speed in KM/s, yes, kilometers per second". In the bottom, motionSpeed() is described as expecting km/h. MotionSpeed() just assigns its given parameter to the motionOption, which in leaflet.motion.js, line 26, is commented with "KM/H". On the other hand, Utils.getDuration() asks for speed in "km/s" but it receives the motionOptions.speed which is supposedly in km/h when called by motionStart(). Could it be that in fact all of the values are actually km/s and are just mislabeled? Thanks!

Igor-Vladyka commented 5 years ago

Hi, Yes, you are right about confusion. It should be KM/H everywhere. Updated.