flyTo static method

MapCameraAnimation flyTo(
  1. GeoCoordinatesUpdate target,
  2. double bowFactor,
  3. 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.

  • 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. MapCameraAnimation instance

Implementation

static MapCameraAnimation flyTo(GeoCoordinatesUpdate target, double bowFactor, Duration duration) => $prototype.flyTo(target, bowFactor, duration);