CameraAnimationOptions

Package: com.eegeo.mapapi.camera

Encapsulates optional parameters for performing a camera animation

Fields

public final double durationSeconds

The duration of the animation, in seconds.

public final double preferredAnimationSpeed

The speed of the animation, in meters per second.

public final double minDuration

The minimum animation duration, in seconds

public final double maxDuration

The maximum animation duration, in seconds

public final double snapDistanceThreshold

The distance threshold, in meters, above which a camera animation will jump to its destination immediately.

public final boolean snapIfDistanceExceedsThreshold

True if the camera animation should jump to its destination for large distances.

public final boolean interruptByGestureAllowed

True if a user touch gesture may interrupt the camera animation.

class CameraAnimationOptions.Builder

A builder class for creating a CameraAnimationOptions instance.

Constructors

Builder()

Methods

CameraAnimationOptions.Builder duration(double durationSeconds)

An explicit animation duration. If this method is not called, the resultant CameraAnimationOptions will indicate that an appropriate duration should be automatically calculated based on the distance of the camera transition.

Returns:

Type argument Description
double durationSeconds The duration of the animation, in seconds.

CameraAnimationOptions.Builder preferredAnimationSpeed(double animationSpeedMetersPerSecond)

The preferred speed at which the camera target should travel, in meters per second. If this method not called, the resultant CameraAnimationOptions will indicate that a default speed should be used.

Returns:

Type argument Description
double animationSpeedMetersPerSecond The speed of the animation, in meters per second.

CameraAnimationOptions.Builder snapIfDistanceExceedsThreshold(boolean shouldSnap)

Configure the options to immediately jump to the animation destination for distances above a threshold. The default is True.

Returns:

Type argument Description
boolean shouldSnap True if the camera animation should jump to its destination for large distances.

CameraAnimationOptions.Builder interruptByGestureAllowed(boolean isAllowed)

Configure whether the animation may be interrupted by user touch gestures. The default is True.

Returns:

Type argument Description
boolean isAllowed True if a user touch gesture may interrupt the camera animation.

CameraAnimationOptions.Builder minDuration(double minDuration)

The minimum duration of the camera animation, if automatically calculated. The default is 1s.

Returns:

Type argument Description
double minDuration The minimum animation duration, in seconds

CameraAnimationOptions.Builder maxDuration(double maxDuration)

The maximum duration of the camera animation, if automatically calculated. The default is 5s.

Returns:

Type argument Description
double maxDuration The maximum animation duration, in seconds

CameraAnimationOptions.Builder snapDistanceThreshold(double snapDistanceThresholdMeters)

The distance threshold above which an animation will jump to its destination immediately. The default is 5000m.

Returns:

Type argument Description
double snapDistanceThresholdMeters The distance, in meters.

CameraAnimationOptions build()

Builds the CameraAnimationOptions object.

Returns: The final CameraAnimationOptions object.

v0.0.1467
Overview Introduction
Picking PickResult
Widgets (Optional) BlueSphere
Tag Service (Optional) TagService OnTagsLoadCompletedListener
RouteView Widget (Optional) RouteView RouteViewOptions