Closed bsjones109 closed 4 years ago
Hi,
That is quite interesting, I heaven't checked it for a while. I will take a look and update you with findings.
Thanks :)
Hi again,
I just updated plugin with map.distance to unify animation across projections. It's in last released version 0.2.
Thanks for your help :)
Hi, I noticed you are using latLng.distanceTo(latLng) in leaflet.motion.utils.js for distance calculation. The leaflet docs say this uses the spherical law of cosines for computation, where distance(latLng, latLng) uses a formula based on the map's CRS. I think the method used in leaflet.motion.utils.js will be inaccurate in some cases like CRS.Simple where the distance(latLng, latLng) formula would calculate the euclidean distance.
I'm not greatly familiar with CRS, but it seems like they're all using different types of projection, so I think it may be possible that the formula used in leaflet.motion.utils.js is only accurate for one of them.
Thanks for the great plugin!