Class MapCameraAnimationFactory

java.lang.Object
com.here.NativeBase
com.here.sdk.mapview.MapCameraAnimationFactory

public final class MapCameraAnimationFactory extends NativeBase

Factory for creating MapCameraAnimation objects to change map's camera over time.

  • Method Details

    • createAnimation

      @NonNull public static MapCameraAnimation createAnimation(@NonNull MapCameraUpdate cameraUpdate, @NonNull Duration duration, @NonNull Easing easing)

      Creates a MapCameraAnimation to gradually update the camera properties within a specified duration from its current values to the ones defined in the cameraUpdate. MapCameraAnimation instances created from MapCameraUpdateFactory.compositeUpdate(java.util.List<com.here.sdk.mapview.MapCameraUpdate>) instances are not supported. An AnimationListener will receive an AnimationState.CANCELLED signal when trying to apply such animations.

      Parameters:
      cameraUpdate -

      Update which should be applied to the map camera.

      duration -

      Duration of the animation. Negative duration results in no camera change when applied.

      easing -

      Easing to apply.

      Returns:

      MapCameraAnimation instance

    • createAnimation

      @NonNull public static MapCameraAnimation createAnimation(@NonNull MapCameraKeyframeTrack track)

      Creates a MapCameraAnimation for a movement defined by the supplied track.

      Parameters:
      track -

      The track

      Returns:

      MapCameraAnimation instance

    • createAnimation

      @NonNull public static MapCameraAnimation createAnimation(@NonNull List<MapCameraKeyframeTrack> tracks) throws MapCameraAnimation.InstantiationException

      Creates a MapCameraAnimation for a movement defined by the supplied list of tracks. Keyframe tracks specify how the map camera properties change during the animation. For the animation to be possible, no two different tracks can affect the same map camera property. The input tracks are validated with that in mind.

      However, the following cases can only be detected at the time when animation is started:

      • Changing altitude of camera position also changes camera look-at distance and at high altitudes, also camera look-at orientation.
      • Changing tilt of camera orientation also changes camera look-at distance and camera look-at target.
      • Changing bearing of camera orientation also changes camera look-at target if current tilt is not 0.
      • Changing tilt or bearing of camera look-at orientation also changes camera position.
      • Changing camera look-at orientation also changes camera look-at distance if tilt is not 0.
      Parameters:
      tracks -

      The list of tracks

      Returns:

      MapCameraAnimation instance

      Throws:
      MapCameraAnimation.InstantiationException -

      Indicates an instantiation issue.

    • flyTo

      @NonNull public static MapCameraAnimation flyTo(@NonNull GeoCoordinatesUpdate target, double bowFactor, @NonNull Duration duration)

      Creates a MapCameraAnimation to move the current map camera look-at coordinates to the new position along an adaptive ballistic curve.

      The beginning and end of the animation will use the current zoom.

      Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      Parameters:
      target -

      The coordinates of the camera destination point. Any target sub-element value that is not finite will be set to the current camera target sub-element value. Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      bowFactor -

      A bow factor that specifies how high (bowFactor > 0) or low (bowFactor < 0) the camera will fly.

      The highest (bowFactor = 1) or lowest point (bowFactor = -1) of the ballistic animation curve is relative to the travel distance between current camera target and destination target.

      A bow factor of 0 does not change the camera's zoom over time.

      Values greater 0 result in a convex bow animation, values below 0 in a concave bowl animation.

      The bow factor is clamped to [-1, +1].

      Note that the lowest possible camera distance to earth is 0 meters and that the animation curve will not go below this value.

      Note that currently, bow factor is ignored and assumed to be 1 if either start or end of animation has a non zero tilt.

      duration -

      Duration of the flight. Negative duration results in no camera change when applied.

      Returns:

      MapCameraAnimation instance

    • flyTo

      @NonNull public static MapCameraAnimation flyTo(@NonNull GeoCoordinatesUpdate target, @NonNull GeoOrientationUpdate orientation, double bowFactor, @NonNull Duration duration)

      Creates a MapCameraAnimation to move the current map camera look-at coordinates to the new position and orientation along an adaptive ballistic curve.

      The beginning and end of the animation will use the current zoom.

      Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      Parameters:
      target -

      The coordinates of the camera destination point. Any target sub-element value that is not finite will be set to the current camera target sub-element value. Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      orientation -

      The orientation at destination.

      bowFactor -

      A bow factor that specifies how high (bowFactor > 0) or low (bowFactor < 0) the camera will fly.

      The highest (bowFactor = 1) or lowest point (bowFactor = -1) of the ballistic animation curve is relative to the travel distance between current camera target and destination target.

      A bow factor of 0 does not change the camera's zoom over time.

      Values greater 0 result in a convex bow animation, values below 0 in a concave bowl animation.

      The bow factor is clamped to [-1, +1].

      Note that the lowest possible camera distance to earth is 0 meters and that the animation curve will not go below this value.

      Note that currently, bow factor is ignored and assumed to be 1 if either start or end of animation has a non zero tilt.

      duration -

      Duration of the flight. Negative duration results in no camera change when applied.

      Returns:

      MapCameraAnimation instance

    • flyTo

      @NonNull public static MapCameraAnimation flyTo(@NonNull GeoCoordinatesUpdate target, @NonNull MapMeasure zoom, double bowFactor, @NonNull Duration duration)

      Creates a MapCameraAnimation to move the current map camera look-at coordinates to the new position along an adaptive ballistic curve.

      The beginning of the animation will use the current zoom and the end of the animation will use the provided zoom.

      Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      Parameters:
      target -

      The coordinates of the camera destination point. Any target sub-element value that is not finite will be set to the current camera target sub-element value. Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      zoom -

      The zoom at the end of the animation.

      bowFactor -

      A bow factor that specifies how high (bowFactor > 0) or low (bowFactor < 0) the camera will fly.

      The highest (bowFactor = 1) or lowest point (bowFactor = -1) of the ballistic animation curve is relative to the travel distance between current camera target and destination target.

      A bow factor of 0 does not affect the camera's zoom over time.

      Values greater 0 result in a convex bow animation, values below 0 in a concave bowl animation.

      The bow factor is clamped to [-1, +1].

      Note that the lowest possible camera distance to earth is 0 meters and that the animation curve will not go below this value.

      Note that currently, bow factor is ignored and assumed to be 1 if either start or end of animation has a non zero tilt.

      duration -

      Duration of the flight. Negative duration results in no camera change when applied.

      Returns:

      MapCameraAnimation instance

    • flyTo

      @NonNull public static MapCameraAnimation flyTo(@NonNull GeoCoordinatesUpdate target, @NonNull GeoOrientationUpdate orientation, @NonNull MapMeasure zoom, double bowFactor, @NonNull Duration duration)

      Creates a MapCameraAnimation to move the current map camera look-at coordinates to the new position and orientation along an adaptive ballistic curve.

      The beginning of the animation will use the current zoom and the end of the animation will use the provided zoom.

      Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      Parameters:
      target -

      The coordinates of the camera destination point. Any target sub-element value that is not finite will be set to the current camera target sub-element value. Note: The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

      orientation -

      The orientation at destination.

      zoom -

      The zoom at the end of the animation.

      bowFactor -

      A bow factor that specifies how high (bowFactor > 0) or low (bowFactor < 0) the camera will fly.

      The highest (bowFactor = 1) or lowest point (bowFactor = -1) of the ballistic animation curve is relative to the travel distance between current camera target and destination target.

      A bow factor of 0 does not affect the camera's zoom over time.

      Values greater 0 result in a convex bow animation, values below 0 in a concave bowl animation.

      The bow factor is clamped to [-1, +1].

      Note that the lowest possible camera distance to earth is 0 meters and that the animation curve will not go below this value.

      Note that currently, bow factor is ignored and assumed to be 1 if either start or end of animation has a non zero tilt.

      duration -

      Duration of the flight. Negative duration results in no camera change when applied.

      Returns:

      MapCameraAnimation instance