AutomotiveCameraBehavior class abstract
High-level camera controller for automotive navigation that delegates to either a TrackingCameraBehavior for following the vehicle or an AreaCameraBehavior for showing geographic regions.
Can also be deactivated via AutomotiveCameraBehavior.activeCameraType to release control to external code.
Configuration including animation durations, zoom policies, maneuver rules, and per-mode tilt/bearing/principal-point profiles is provided via a JSON string and validated at construction. The AreaCameraBehavior anchor is taken from the AutomotiveCameraBehaviorOrientationMode.modeNorthUp principal point in the configuration.
Note: This is a beta release of this feature and may contain bugs or exhibit unexpected behaviour. Related APIs are subject to change without a deprecation process.
- Implemented types
Constructors
- AutomotiveCameraBehavior()
-
Creates a new instance with default configuration.
factory
- AutomotiveCameraBehavior.fromJson(String configJson)
-
Creates a new instance configured from a JSON string.
factory
Properties
- activeCameraType ↔ AutomotiveCameraBehaviorActiveCameraType
-
The active camera type.
Selects which child camera handles updates. Set to AutomotiveCameraBehaviorActiveCameraType.none
to release control to external code, AutomotiveCameraBehaviorActiveCameraType.tracking for the
TrackingCameraBehavior, or AutomotiveCameraBehaviorActiveCameraType.area to use the most recent framing
configured via AutomotiveCameraBehavior.setAreaCameraBehaviorVisiblePoints or AutomotiveCameraBehavior.setAreaCameraBehaviorGeobox.
Defaults to AutomotiveCameraBehaviorActiveCameraType.none.
Gets the active camera type.
getter/setter pair
- areaMaxZoom ↔ double?
-
Maximal allowed zoom level for the AreaCameraBehavior.
Forwarded to the internal AreaCameraBehavior. Defaults to
null. Gets the maximal allowed zoom for the area camera.getter/setter pair - areaMinZoom ↔ double?
-
Minimal allowed zoom level for the AreaCameraBehavior.
Forwarded to the internal AreaCameraBehavior. Defaults to
null. Gets the minimal allowed zoom for the area camera.getter/setter pair - cameraTransitionMode ↔ CameraTransitionMode
-
Defines how the camera starts following the current position when this camera
behavior becomes active.
Use CameraTransitionMode.instant to skip the camera animation, for example
when returning from a route overview to guidance.
The default value is CameraTransitionMode.animated.
Gets the currently set camera transition mode.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLookAheadEnabled ↔ bool
-
If enabled, the TrackingCameraBehavior will use look-ahead mode.
When
trueand guidance is active, the camera targets a point ahead on the route. Behavior is defined in the JSON configuration. Defaults tofalse. Returnstruewhen look-ahead is enabled.getter/setter pair - isManeuverDetectionEnabled ↔ bool
-
If enabled, the TrackingCameraBehavior reacts to upcoming maneuvers.
Reactions follow the rules defined in the JSON configuration. The initial
value is taken from configuration. Changes apply immediately when
AutomotiveCameraBehaviorActiveCameraType.tracking, otherwise the next time tracking is activated.
Defaults to
false, unless configured in JSON configuration. Returns true when maneuver detection is enabled.getter/setter pair - minimumHdLengthInMeters ↔ int
-
Minimum HD lane data length threshold in meters.
The camera transitions from HD to SD mode when HD lane data availability
falls below this distance ahead, or transitions to HD mode when sufficient HD data is detected.
Gets the minimum HD length in meters.
getter/setter pairinherited
- 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
- orientationMode ↔ AutomotiveCameraBehaviorOrientationMode
-
The current orientation mode of the TrackingCameraBehavior.
Selects the tilt, bearing, and principal point profile applied to the
TrackingCameraBehavior. Profile values are taken from the JSON configuration. The
AreaCameraBehavior always renders in AutomotiveCameraBehaviorOrientationMode.modeNorthUp regardless of
this property.
Defaults to AutomotiveCameraBehaviorOrientationMode.mode3d.
Gets the current orientation mode.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- viewRectangle ↔ Rectangle2D?
-
The view rectangle for camera updates.
Defines a sub-space of the screen that the behavior should consider
for camera updates. Using a view rectangle keeps the camera positioning consistent
across different screen types and orientations without per-screen principal point
adjustments.
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 pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAreaCameraBehaviorGeobox(
GeoBox geobox) → void - Configures the AreaCameraBehavior to enclose the given geographic bounding box in its camera view.
-
setAreaCameraBehaviorVisiblePoints(
List< GeoCoordinates> points, bool includeCurrentPosition) → void - Configures the AreaCameraBehavior to show the given points in its camera view.
-
setPrincipalPointForOrientation(
AutomotiveCameraBehaviorOrientationMode mode, Anchor2D value) → void - Sets the principal point for a specific AutomotiveCameraBehaviorOrientationMode.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited