SpeedBasedZoomPolicyOptions
public struct SpeedBasedZoomPolicyOptions
Configuration for computing zoom values from speed thresholds defined per road classification.
For correct default initialization, use TrackingCameraBehavior.defaultSpeedBasedZoomPolicyOptions(...).
-
Default zoom returned when the speed or road classification is missing or unmapped. Defaults to 19.0.
Declaration
Swift
public var defaultZoom: Double -
Minimum time interval that must pass before the zoom value is allowed to switch to a new speed threshold. If
TrackingCameraBehavior.defaultSpeedBasedZoomPolicyOptions(...)is not used forTrackingCameraBehavior.SpeedBasedZoomPolicyOptions, it will benil.Declaration
Swift
public var delayBetweenThresholdChanges: TimeInterval? -
Defines, per road classification, how the zoom value should change in response to different vehicle speeds. If
TrackingCameraBehavior.defaultSpeedBasedZoomPolicyOptions(...)is not used forTrackingCameraBehavior.SpeedBasedZoomPolicyOptions, it will be an empty map.Declaration
Swift
public var roadClassificationToSpeedThreshold: [RoadClassification : [TrackingCameraBehavior.SpeedThreshold]] -
Creates a new instance.
Declaration
Swift
public init(defaultZoom: Double = 19.0, delayBetweenThresholdChanges: TimeInterval? = nil, roadClassificationToSpeedThreshold: [RoadClassification : [TrackingCameraBehavior.SpeedThreshold]] = [:])