MapCameraKeyframeTrack
public class MapCameraKeyframeTrack
extension MapCameraKeyframeTrack: NativeBase
extension MapCameraKeyframeTrack: Hashable
Stores keyframes for interpolation of a camera property using a specific easing function and interpolation mode. Can only hold keyframes of a single type.
-
Thrown when a problem occurs while trying to create
MapCameraKeyframeTrack.Declaration
Swift
public typealias InstantiationError = InstantiationErrorCode -
Interpolation mode affects the shape of the spline going through all keyframes.
Declaration
Swift
public var interpolationMode: KeyframeInterpolationMode { get } -
Describes a reason for failing to create a MapCameraKeyframeTrack.
See moreDeclaration
Swift
public enum InstantiationErrorCode : UInt32, CaseIterable, Codableextension MapCameraKeyframeTrack.InstantiationErrorCode : Error -
Declaration
Swift
public func getScalarKeyframes() -> [ScalarKeyframe]?Return Value
a copy of the scalar keyframes or nothing if this is not a scalar keyframe track.
-
Declaration
Swift
public func getPoint2DKeyframes() -> [Point2DKeyframe]?Return Value
a copy of the point 2d keyframes or nothing if this is not a point 2d keyframe track.
-
Declaration
Swift
public func getAnchor2DKeyframes() -> [Anchor2DKeyframe]?Return Value
a copy of the anchor 2d keyframes or nothing if this is not an anchor 2d keyframe track.
-
Declaration
Swift
public func getGeoCoordinatesKeyframes() -> [GeoCoordinatesKeyframe]?Return Value
a copy of the geo coordinates keyframes or nothing if this is not a geo coordinates keyframe track.
-
Declaration
Swift
public func getGeoOrientationKeyframes() -> [GeoOrientationKeyframe]?Return Value
a copy of the geo orientation keyframes or nothing if this is not a geo orientation keyframe track.
-
Creates a map camera look-at distance keyframe track. It enables animations of the distance from the map camera to the target point that the camera looks at in meters. The values will be clamped according to the minimum and maximum zoom levels set for the map camera.
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.27.0. Use `MapCameraKeyframeTrack.lookAtDistance(MapMeasure.Kind, [ScalarKeyframe], Easing, KeyframeInterpolationMode﹚` instead.") public static func lookAtDistance(keyframes: [ScalarKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
keyframesThe list of keyframes that specify how the camera property is changed. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the distance from the map camera to its target.
-
Creates a map camera look-at distance keyframe track. It enables animations of the distance from the map camera to the target point that the camera looks at. The measure kind of that distance can be specified. The values will be clamped according to the minimum and maximum zoom levels set for the map camera.
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
public static func lookAtDistance(ofKind distanceKind: MapMeasure.Kind, keyframes: [ScalarKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
distanceKindThe kind of measure of distance between camera and target point.
keyframesThe list of keyframes that specify how the camera property is changed. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the distance from the map camera to its target.
-
Creates a map camera look-at target keyframe track. It enables animations over the geographical coordinates of the target point that the map camera is looking at. Altitude components of coordinates are ignored.
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
public static func lookAtTarget(keyframes: [GeoCoordinatesKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
keyframesThe list of keyframes that specify how the camera property is changed. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the map camera target coordinates.
-
Creates a map camera look-at orientation keyframe track. It enables animations over the orientation of the map camera target (bearing and tilt).
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
public static func lookAtOrientation(keyframes: [GeoOrientationKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
keyframesThe list of keyframes that specify how the camera property is changed. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the map camera target orientation.
-
Creates a map camera principal point keyframe track. It enables animations on the pixel point where the map camera’s target is placed in view coordinates. (0,0) is top left of the viewport, (viewport width, viewport height) is bottom right.
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
public static func principalPoint(keyframes: [Point2DKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
keyframesThe list of keyframes that specify how the camera property is changed. Point values must be in screen (pixel) coordinates with origin (0,0) in the top left of the viewport. Point values outside of viewport boundaries will be clamped to the viewport boundaries during animation. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the principal point.
-
Creates a map camera principal point keyframe track. It enables animations on the point where the map camera’s target is placed in normalized view coordinates. (0,0) is top left of the viewport, (1, 1) is bottom right.
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
public static func normalizedPrincipalPoint(keyframes: [Anchor2DKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
keyframesThe list of keyframes that specify how the camera property is changed. Point values must be in normalized screen coordinates with origin (0,0) in the top left and (1,1) in the bottom right of the viewport. Point values outside of viewport boundaries will be clamped to the viewport boundaries during animation. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the principal point.
-
Creates a map camera field-of-view keyframe track. It enables animations over the angle of the field of view captured by the map camera in degrees. Values will be clamped to a range from 1 to 150.
Throws
MapCameraKeyframeTrack.InstantiationErrorIndicates an instantiation issue.Declaration
Swift
public static func fieldOfView(keyframes: [ScalarKeyframe], easing: Easing, interpolationMode: KeyframeInterpolationMode) throws -> MapCameraKeyframeTrackParameters
keyframesThe list of keyframes that specify how the camera property is changed. Keyframe time offsets are considered to be relative to the previous keyframe in the list or relative to the start of the animation if the current keyframe is first in the list. Time offset of the first keyframe in the list should be 0, otherwise an error occurs and creation of the keyframe track will fail.
easingThe easing to apply during keyframe interpolation.
interpolationModeThe type of interpolation done between keyframe values.
Return Value
A keyframe track over the map camera field-of-view.