ewoken / Leaflet.MovingMarker

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

Marker drifting off line when coords are across equator. #27

Open williamfalconeruk opened 6 years ago

williamfalconeruk commented 6 years ago

We have spotted an issue whereby if you place a moving marker to follow between 2 points on a polyline if one is in say "Paris", and the other end is in "Rio De Janeiro" the marker drifts off from the line to the right, then returns back to the line at the end.

Is there a way to fix this?

williamfalconeruk commented 6 years ago

Have found a solution to this - I have replaced the interpolation with one that mimics rhumb lines - see http://movable-type.co.uk/scripts/latlong.html

williamfalconeruk commented 6 years ago

Opening to create pull request

aakashbehal commented 6 years ago

@williamfalconeruk can you please send the pull request, need your solution. Thanks in advance.

Shivangi266 commented 6 years ago

Hi, Facing the same issue. Can you please let me know what is the solution? Thanks in advance.