FollowCameraOperatorConfig

data class FollowCameraOperatorConfig(val controlPointsMap: Map<FollowCameraOperatorConfig.RoadClass, List<FollowCameraOperatorConfig.ControlPoint>> = emptyMap(), @FloatRange(from = 0.0, to = 22.0) val minZoom: Double? = null, @FloatRange(from = 0.0, to = 22.0) val maxZoom: Double? = null, @FloatRange(from = 0.0, to = 22.0) val defaultZoom: Double? = null, @FloatRange(from = 0.0, to = 90.0) val defaultTilt: Double? = null, @FloatRange(from = 1.0, to = 150.0) val defaultFov: Double? = null, @FloatRange(from = 0.0, to = 6000.0) val showCombinedInstructionMaxZoom: Double? = null, @FloatRange(from = 1.0) val showCombinedInstructionMaxZoomChange: Double? = null)

The configuration for follow camera operators.

Applicable to CameraTrackingMode.FollowNorthUp, CameraTrackingMode.FollowRouteDirection, CameraTrackingMode.FollowDirection, CameraTrackingMode.FollowRouteNorthUp

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
constructor(controlPointsMap: Map<FollowCameraOperatorConfig.RoadClass, List<FollowCameraOperatorConfig.ControlPoint>> = emptyMap(), @FloatRange(from = 0.0, to = 22.0) minZoom: Double? = null, @FloatRange(from = 0.0, to = 22.0) maxZoom: Double? = null, @FloatRange(from = 0.0, to = 22.0) defaultZoom: Double? = null, @FloatRange(from = 0.0, to = 90.0) defaultTilt: Double? = null, @FloatRange(from = 1.0, to = 150.0) defaultFov: Double? = null, @FloatRange(from = 0.0, to = 6000.0) showCombinedInstructionMaxZoom: Double? = null, @FloatRange(from = 1.0) showCombinedInstructionMaxZoomChange: Double? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class ControlPoint(val distance: Distance, @FloatRange(from = 0.0, to = 22.0) val zoom: Double, @FloatRange(from = 0.0, to = 90.0) val tilt: Double = DEFAULT_TILT, @FloatRange(from = 1.0, to = 150.0) val fov: Double = DEFAULT_FIELD_OF_VIEW)

Array of control points, each of which contains 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.

Link copied to clipboard
value class RoadClass

Road class that is used along with ControlPoint to describe follow route camera operator behaviour.

Properties

Link copied to clipboard

Dictionary of control points named after the corresponding road classes. This part of the configuration is only valid for the CameraTrackingMode.FollowRouteDirection camera operator. The follow route camera operator interpolates the tilt and scale according to the current camera position in relation to the next instruction, using the control points. Different control points can be defined for different road classes. The "default" road class is reserved for cases when there is no entry for a specific road class, or if the road class information is not available. If the entry for the "default" road class is missing, default internal values will be used in such cases. An example of a default internal value is a 0 tilt for both north-up follow camera operators.

Link copied to clipboard
val defaultFov: Double? = null

Optional default field of view.

Link copied to clipboard
val defaultTilt: Double? = null

Optional default tilt allowed for this camera operator. The camera tilt is set to the default tilt upon activation of this camera operator.

Link copied to clipboard
val defaultZoom: Double? = null

Optional default zoom allowed for this camera operator. The camera zoom is set to the default zoom upon activation of this camera operator. When defined, should be greater than min-zoom if min-scale is defined; smaller than max-zoom if max-zoom is defined.

Link copied to clipboard
val maxZoom: Double? = null

Optional maximum zoom allowed for this camera operator. The camera zoom is clamped according to the max zoom value upon activation of this camera operator. When defined, should be greater than min-zoom.

Link copied to clipboard
val minZoom: Double? = null

Optional minimum zoom allowed for this camera operator. The camera zoom is clamped according to the min zoom value upon activation of this camera operator. When defined, should be less than max-zoom.

Link copied to clipboard

Determines the maximum zoom that can be applied to keep a combined next instruction in the safe area. This only applies in cases where the next instruction is combined with the one after it. If the zoom needed to keep the combined next instruction inside the safe area is greater than this value, the camera operator skips the current scale change. Future zoom changes are not affected.

Link copied to clipboard

Determines the maximum amount that the zoom can change per meter. This is needed because at each geometry point, the algorithm checks whether the combined instruction arrow fits within the safe area. If not, the zoom is increased. Changing the zoom too quickly is distracting. So zoom adjustments are smoothed: the zoom is gradually changed before the increased level is actually needed, then gradually changed back afterwards. Scale smoothing means that there are points when the view is more zoomed out than the combined instruction arrow needs. If too much smoothing is used, the zoom may not have time to return to its optimal level between adjustments.