Class MapCameraKeyframeTrack


  • public final class MapCameraKeyframeTrack
    extends NativeBase

    Stores keyframes for interpolation of a camera property using a specific easing function and interpolation mode. Can only hold keyframes of a single type.

    • Method Detail

      • getScalarKeyframes

        @Nullable
        public java.util.List<ScalarKeyframe> getScalarKeyframes()
        Returns:

        a copy of the scalar keyframes or nothing if this is not a scalar keyframe track.

      • getPoint2DKeyframes

        @Nullable
        public java.util.List<Point2DKeyframe> getPoint2DKeyframes()
        Returns:

        a copy of the point 2d keyframes or nothing if this is not a point 2d keyframe track.

      • getAnchor2DKeyframes

        @Nullable
        public java.util.List<Anchor2DKeyframe> getAnchor2DKeyframes()
        Returns:

        a copy of the anchor 2d keyframes or nothing if this is not an anchor 2d keyframe track.

      • getGeoCoordinatesKeyframes

        @Nullable
        public java.util.List<GeoCoordinatesKeyframe> getGeoCoordinatesKeyframes()
        Returns:

        a copy of the geo coordinates keyframes or nothing if this is not a geo coordinates keyframe track.

      • getGeoOrientationKeyframes

        @Nullable
        public java.util.List<GeoOrientationKeyframe> getGeoOrientationKeyframes()
        Returns:

        a copy of the geo orientation keyframes or nothing if this is not a geo orientation keyframe track.

      • lookAtDistance

        @Deprecated
        @NonNull
        public static MapCameraKeyframeTrack lookAtDistance​(@NonNull
                                                            java.util.List<ScalarKeyframe> keyframes,
                                                            @NonNull
                                                            Easing easing,
                                                            @NonNull
                                                            KeyframeInterpolationMode interpolationMode)
                                                     throws MapCameraKeyframeTrack.InstantiationException
        Deprecated.

        Will be removed in v4.27.0. Use , Easing, KeyframeInterpolationMode) instead.

        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.

        Parameters:
        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the distance from the map camera to its target.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • lookAtDistance

        @NonNull
        public static MapCameraKeyframeTrack lookAtDistance​(@NonNull
                                                            MapMeasure.Kind distanceKind,
                                                            @NonNull
                                                            java.util.List<ScalarKeyframe> keyframes,
                                                            @NonNull
                                                            Easing easing,
                                                            @NonNull
                                                            KeyframeInterpolationMode interpolationMode)
                                                     throws MapCameraKeyframeTrack.InstantiationException

        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.

        Parameters:
        distanceKind -

        The kind of measure of distance between camera and target point.

        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the distance from the map camera to its target.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • lookAtTarget

        @NonNull
        public static MapCameraKeyframeTrack lookAtTarget​(@NonNull
                                                          java.util.List<GeoCoordinatesKeyframe> keyframes,
                                                          @NonNull
                                                          Easing easing,
                                                          @NonNull
                                                          KeyframeInterpolationMode interpolationMode)
                                                   throws MapCameraKeyframeTrack.InstantiationException

        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.

        Parameters:
        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the map camera target coordinates.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • lookAtOrientation

        @NonNull
        public static MapCameraKeyframeTrack lookAtOrientation​(@NonNull
                                                               java.util.List<GeoOrientationKeyframe> keyframes,
                                                               @NonNull
                                                               Easing easing,
                                                               @NonNull
                                                               KeyframeInterpolationMode interpolationMode)
                                                        throws MapCameraKeyframeTrack.InstantiationException

        Creates a map camera look-at orientation keyframe track. It enables animations over the orientation of the map camera target (bearing and tilt).

        Parameters:
        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the map camera target orientation.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • principalPoint

        @NonNull
        public static MapCameraKeyframeTrack principalPoint​(@NonNull
                                                            java.util.List<Point2DKeyframe> keyframes,
                                                            @NonNull
                                                            Easing easing,
                                                            @NonNull
                                                            KeyframeInterpolationMode interpolationMode)
                                                     throws MapCameraKeyframeTrack.InstantiationException

        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.

        Parameters:
        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the principal point.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • normalizedPrincipalPoint

        @NonNull
        public static MapCameraKeyframeTrack normalizedPrincipalPoint​(@NonNull
                                                                      java.util.List<Anchor2DKeyframe> keyframes,
                                                                      @NonNull
                                                                      Easing easing,
                                                                      @NonNull
                                                                      KeyframeInterpolationMode interpolationMode)
                                                               throws MapCameraKeyframeTrack.InstantiationException

        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.

        Parameters:
        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the principal point.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • fieldOfView

        @NonNull
        public static MapCameraKeyframeTrack fieldOfView​(@NonNull
                                                         java.util.List<ScalarKeyframe> keyframes,
                                                         @NonNull
                                                         Easing easing,
                                                         @NonNull
                                                         KeyframeInterpolationMode interpolationMode)
                                                  throws MapCameraKeyframeTrack.InstantiationException

        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.

        Parameters:
        keyframes -

        The 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.

        easing -

        The easing to apply during keyframe interpolation.

        interpolationMode -

        The type of interpolation done between keyframe values.

        Returns:

        A keyframe track over the map camera field-of-view.

        Throws:
        MapCameraKeyframeTrack.InstantiationException -

        Indicates an instantiation issue.

      • getInterpolationMode

        @NonNull
        public KeyframeInterpolationMode getInterpolationMode()

        Gets the interpolation mode for the between key frames in the track.

        Returns:

        Interpolation mode affects the shape of the spline going through all keyframes.