TrackingCameraBehavior class abstract

Use this class to follow a moving target.

The camera smoothly tracks the target’s position while adjusting heading, tilt, and zoom as needed. When tracking starts or resumes, the camera first animates a re-centering transition to align with the target.

Note: This is a beta feature; there maybe bugs and unexpected behavior. Related API's are subject to change without a deprecation process.

Implemented types

Constructors

TrackingCameraBehavior()
Creates a new instance of this class.
factory

Properties

bearingInDegrees ↔ double?
The camera bearing in degrees. Optional fixed bearing, from true North (0 degrees) in clockwise direction. The valid range is [0, 360]. If set, it will prevent the map from rotating to the direction of travel. For example, a value of zero results in "north up" mode. Defaults to null, which means the camera derives the bearing from the Location, so that it points to the direction of travel. If this property is null and the device does not provide bearing, the last known value is used or zero otherwise. Gets the bearing in degrees.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isManeuverDetectionEnabled ↔ bool
Whether maneuver detection is enabled. When true, the camera detects adjacent maneuvers and reacts according to the TrackingCameraBehaviorManeuverModeConfiguration set via TrackingCameraBehavior.setManeuverModeConfiguration. A valid TrackingCameraBehaviorManeuverModeConfiguration must be set for the camera to react. Defaults to false. Gets whether maneuver detection is enabled.
getter/setter pair
maxRotationSpeedInDegreesPerSecond ↔ double
The maximum rotation speed. Maximum bearing rotation speed in degrees per second, limiting how fast the camera turns. Defaults to 20 degrees per second. Gets the maximum rotation speed.
getter/setter pair
normalizedPrincipalPoint Anchor2D
The normalized principal point. Normalized principal point to be used during navigation. Defaults to (0.5, 0.775), which means the camera will use the position slightly at the bottom of the mapview. Gets the currently set normalized principal point to be used during navigation.
getter/setter pairinherited
principalPointAnimationDuration ↔ Duration
The duration of principal point animation in milliseconds. If the principal point is changed, the change will be animated over this duration. Defaults to 500 milliseconds, or half a second. Gets the current principal point animation duration in milliseconds.
getter/setter pair
recenterAnimationDuration ↔ Duration
The duration of recenter animation in milliseconds. Time to recenter the camera reaching current car position. Defaults to 500 milliseconds, or half a second. Gets the recenter animation duration in milliseconds.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tiltInDegrees ↔ double
The value of camera tilt in degrees. Camera tilt angle relative to the ground plane, in degrees. Defaults to 50. Gets the camera tilt in degrees.
getter/setter pair
viewRectangle Rectangle2D?
The view rectangle for camera updates. Defines a sub-space of the screen that the behavior should consider for camera updates. Defaults to null. If not set, it uses the viewport bounds of the underlying map view. Gets the current view rectangle, if it's set.
getter/setter pair
zoomPolicy TrackingCameraBehaviorZoomPolicy
The strategy of computing the zoom level. Defines the strategy used to compute the zoom level based on scene heuristics. Defaults to a fixed zoom policy at zoom level 16.5. Gets the current zoom computation strategy.
getter/setter pair
zoomSpeedInLevelsPerSecond ↔ double
The zoom level transition speed. Speed factor controlling how quickly the camera transitions between zoom levels Defaults to 0.5 zoom levels per second. Gets the zoom level transition speed.
getter/setter pair

Methods

flagFixedDurationForNextAnimation() → void
Enables fixed-duration animation mode for the next property change.
getManeuverModeConfiguration() TrackingCameraBehaviorManeuverModeConfiguration?
Gets the current maneuver mode configuration, or null if not set.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setManeuverModeConfiguration(TrackingCameraBehaviorManeuverModeConfiguration? maneuverModeConfiguration) → void
Sets the configuration for camera behavior near maneuvers.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

defaultFunctionalRoadClassZoomPolicyOptions() TrackingCameraBehaviorFunctionalRoadClassZoomPolicyOptions
Returns TrackingCameraBehaviorFunctionalRoadClassZoomPolicyOptions. The default TrackingCameraBehaviorFunctionalRoadClassZoomPolicyOptions.
defaultManeuverModeConfiguration() TrackingCameraBehaviorManeuverModeConfiguration
Returns TrackingCameraBehaviorManeuverModeConfiguration. The default TrackingCameraBehaviorManeuverModeConfiguration.
defaultSpeedBasedZoomPolicyOptions() TrackingCameraBehaviorSpeedBasedZoomPolicyOptions
Returns TrackingCameraBehaviorSpeedBasedZoomPolicyOptions. The default TrackingCameraBehaviorSpeedBasedZoomPolicyOptions.