MapItemKeyFrameTrack (API Reference)
Class MapItemKeyFrameTrack
Stores keyframes for interpolation of a map item property using a specific easing function and interpolation mode.
The keyframe track object is used to create animations,
see MapMarkerAnimation and MapPolylineAnimation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes a reason for failing to create aMapItemKeyFrameTrack.static final classThrown when a problem occurs while trying to createMapItemKeyFrameTrack. -
Method Summary
Modifier and TypeMethodDescriptionstatic MapItemKeyFrameTrackmoveTo(List<GeoCoordinatesKeyframe> keyframes, Easing easing, KeyframeInterpolationMode interpolationMode) Creates a map item position keyframe track.static MapItemKeyFrameTrackpolylineProgress(List<ScalarKeyframe> keyframes, Easing easing, KeyframeInterpolationMode interpolationMode) Creates a keyframe track used to animate the progress of a polyline.
-
Method Details
-
moveTo
@NonNull public static MapItemKeyFrameTrack moveTo(@NonNull List<GeoCoordinatesKeyframe> keyframes, @NonNull Easing easing, @NonNull KeyframeInterpolationMode interpolationMode) throws MapItemKeyFrameTrack.InstantiationException Creates a map item position keyframe track. It enables animations over the geographical coordinates where the map item is positioned.
- Parameters:
keyframes-The list of keyframes that specify how the map item position changes over time.
easing-The easing to apply during keyframe interpolation.
interpolationMode-The type of interpolation done between keyframe values.
- Returns:
MapItemKeyFrameTrack instance.
- Throws:
MapItemKeyFrameTrack.InstantiationException-If the supplied keyframe list is empty or first keyframe duration is not 0.
-
polylineProgress
@NonNull public static MapItemKeyFrameTrack polylineProgress(@NonNull List<ScalarKeyframe> keyframes, @NonNull Easing easing, @NonNull KeyframeInterpolationMode interpolationMode) throws MapItemKeyFrameTrack.InstantiationException Creates a keyframe track used to animate the progress of a polyline.
Each scalar keyframe specifies the progress property (as passed to
MapPolyline.setProgress(double)) at key points of the animation.- Parameters:
keyframes-The list of keyframes that specify how the polyline progress changes over time.
easing-The easing to apply during keyframe interpolation.
interpolationMode-The type of interpolation done between keyframe values.
- Returns:
MapItemKeyFrameTrack instance.
- Throws:
MapItemKeyFrameTrack.InstantiationException-If the supplied keyframe list is empty or first keyframe duration is not 0.
-