ControlPoint
public struct ControlPoint
extension ControlPoint: Equatable
The camera configuration for a given distance to the next instruction on the route. Intermediate values are obtained by linear interpolation between the corresponding points.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Inits the ControlPoint structure.
Declaration
Swift
public init(distance: Measurement<UnitLength>, tilt: Double, zoom: Double, fov: Double = 45)
-
Distance to the next route instruction from which the camera configuration below will be applied. Its value must be greater than zero.
Declaration
Swift
public let distance: Measurement<UnitLength>
-
Optional tilt to be applied to the camera when the corresponding distance is reached. It must range from 0 to 90. If tilt is not provided, a tilt value of 0 is used.
Declaration
Swift
public let tilt: Double
-
Zoom to be applied. Its value must be greater than zero.
Declaration
Swift
public let zoom: Double
-
Optional FoV (Field of View) (in degrees) to be applied. This must be in the range from 1.0 to 150.0 (inclusive). If no value is provided, then the default value of 45.0 is used. The FoV used may be different from the entered value, depending on the camera scale:
- If the camera zoom is less than ~13.7, then the FoV value defined in the camera control point will be used.
- If the camera zoom is in the range [13.7..12.4], the FoV is adjusted to approach 45 degrees. The amount of adjustment increases proportionately with the camera scale. The FoV for a camera scale close to 12.4 will be adjusted to be close to 45 degrees. The FoV for a camera scale closer to 3.7 will have less adjustment applied to it.
- If the camera scale is greater than 12.4, the default value of 45 degrees for the field of view will be used.
Declaration
Swift
public let fov: Double
-
Equatable implementation.
Declaration
Swift
public static func == (lhs: ControlPoint, rhs: ControlPoint) -> Bool