You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, thanks a lot for the fantastic plugin - looks cool. Had a small question as I am just getting started the leaflet - I have a situation where GPS data is received periodically by the server. How can I use your animated marker plugin to smoothly move the marker to the new gps location rather than just the current 'abrupt' jump method I am using. I guess I will have to do something like below?
var line = L.polyline([[Current Lat Lon],[New Lat lon]]),
animatedMarker = L.animatedMarker(line.getLatLngs());
map.addLayer(animatedMarker);
Do I have to keep doing map.addLayer for every new gps position that I receiver?
Thanks,
M&M
The text was updated successfully, but these errors were encountered:
No, addLayer simply adds the layer to the map, not points to the line. You would need to add points to the polyline layer instead. I don't know if this would work automatically but seem like it would be possible.
hi, thanks a lot for the fantastic plugin - looks cool. Had a small question as I am just getting started the leaflet - I have a situation where GPS data is received periodically by the server. How can I use your animated marker plugin to smoothly move the marker to the new gps location rather than just the current 'abrupt' jump method I am using. I guess I will have to do something like below?
Do I have to keep doing map.addLayer for every new gps position that I receiver?
Thanks,
M&M
The text was updated successfully, but these errors were encountered: