MapItemKeyFrameTrack

public class MapItemKeyFrameTrack
extension MapItemKeyFrameTrack: NativeBase
extension MapItemKeyFrameTrack: Hashable

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.

  • Thrown when a problem occurs while trying to create MapItemKeyFrameTrack.

    Declaration

    Swift

    public typealias InstantiationError = InstantiationErrorCode
  • Describes a reason for failing to create a MapItemKeyFrameTrack.

    See more

    Declaration

    Swift

    public enum InstantiationErrorCode : UInt32, CaseIterable, Codable
    extension MapItemKeyFrameTrack.InstantiationErrorCode : Error
  • Creates a map item position keyframe track. It enables animations over the geographical coordinates where the map item is positioned.

    Throws

    MapItemKeyFrameTrack.InstantiationError If the supplied keyframe list is empty or first keyframe duration is not 0.

    Declaration

    Swift

    public static func moveTo(keyframes: [GeoCoordinatesKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapItemKeyFrameTrack

    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.

    Return Value

    MapItemKeyFrameTrack instance.

  • Creates a keyframe track used to animate the progress of a polyline.

    Each scalar keyframe specifies the value of MapPolyline.progress at key points of the animation.

    Throws

    MapItemKeyFrameTrack.InstantiationError If the supplied keyframe list is empty or first keyframe duration is not 0.

    Declaration

    Swift

    public static func polylineProgress(keyframes: [ScalarKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapItemKeyFrameTrack

    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.

    Return Value

    MapItemKeyFrameTrack instance.

  • Creates a keyframe track used to animate the scale of a map item.

    Each scalar keyframe specifies the scale value at key points of the animation.

    Throws

    MapItemKeyFrameTrack.InstantiationError If the supplied keyframe list is empty or first keyframe duration is not 0.

    Declaration

    Swift

    public static func scale(keyframes: [ScalarKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapItemKeyFrameTrack

    Parameters

    keyframes

    The list of keyframes that specify how the scale changes over time.

    easing

    The easing to apply during keyframe interpolation.

    interpolationMode

    The type of interpolation done between keyframe values.

    Return Value

    MapItemKeyFrameTrack instance.

  • Creates a keyframe track used to animate the opacity of a map item.

    Each scalar keyframe specifies the opacity value (in the range [0.0, 1.0]) at key points of the animation. Values outside this range are clamped by the map item when the animation is applied.

    Throws

    MapItemKeyFrameTrack.InstantiationError If the supplied keyframe list is empty or first keyframe duration is not 0.

    Declaration

    Swift

    public static func opacity(keyframes: [ScalarKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapItemKeyFrameTrack

    Parameters

    keyframes

    The list of keyframes that specify how the opacity changes over time.

    easing

    The easing to apply during keyframe interpolation.

    interpolationMode

    The type of interpolation done between keyframe values.

    Return Value

    MapItemKeyFrameTrack instance.