startMoving | R Documentation |
The marker begins its path or resumes if it is paused.
startMoving(map, layerId = NULL)
stopMoving(map, layerId = NULL)
pauseMoving(map, layerId = NULL)
resumeMoving(map, layerId = NULL)
addLatLngMoving(map, layerId = NULL, latlng, duration)
moveToMoving(map, layerId = NULL, latlng, duration)
addStationMoving(map, layerId = NULL, pointIndex, duration)
map |
The leafletProxy object |
layerId |
You can pass a string or a vector of strings for the moving markers that you want to address. If none is specified, the action will be applied to all moving markers. |
latlng |
Coordinates as list (e.g.: |
duration |
Duration in milliseconds |
pointIndex |
Index of a certain point |
the new map
object
stopMoving()
: Manually stops the marker, if you call start
after, the marker starts again the polyline at the beginning.
pauseMoving()
: Pauses the marker
resumeMoving()
: The marker resumes its animation
addLatLngMoving()
: Adds a point to the polyline.
Useful, if we have to set the path one by one.
moveToMoving()
: Stop the current animation and make the marker move
to latlng
in duration
ms.
addStationMoving()
: The marker will stop at the pointIndex
point
of the polyline for duration
milliseconds. You can't add a station
at the first or last point of the polyline.
https://github.com/ewoken/Leaflet.MovingMarker
Other MovingMarker Functions:
addMovingMarker()
,
movingMarkerOptions()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.