SpeedBasedZoomPolicyOptions
public struct SpeedBasedZoomPolicyOptions
Configuration for computing zoom levels 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 a
MapMeasurewith kindMapMeasure.Kind.zoomLeveland value 19.0.Declaration
Swift
public var defaultZoom: MapMeasure -
Minimum time interval that must pass before the zoom level 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 level 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.
Note: This is a beta feature; there maybe bugs and unexpected behavior. Related API’s are subject to change without a deprecation process.
Declaration
Swift
public init(defaultZoom: MapMeasure = MapMeasure(kind: MapMeasure.Kind.zoomLevel, value: 19.0), delayBetweenThresholdChanges: TimeInterval? = nil, roadClassificationToSpeedThreshold: [RoadClassification : [TrackingCameraBehavior.SpeedThreshold]] = [:])