FixedCameraBehavior
public class FixedCameraBehavior : CameraBehavior
extension FixedCameraBehavior: NativeBase
extension FixedCameraBehavior: Hashable
Use this class to follow the current location of the user: The camera will permanently look at the target location that was fed into the navigator instance. Since location updates happen in discrete intervals, locations in-between will be interpolated to achieve a smooth camera movement.
-
Creates a new instance of this class.
Declaration
Swift
public init() -
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.
Declaration
Swift
public var normalizedPrincipalPoint: Anchor2D { get set } -
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
nil. If not set, it uses the viewport bounds of the underlying map view.Declaration
Swift
public var viewRectangle: Rectangle2D? { get set } -
Defines how the camera starts following the current position when this camera behavior becomes active. Use
CameraTransitionMode.instantto skip the camera animation, for example when returning from a route overview to guidance. The default value isCameraTransitionMode.animated.Declaration
Swift
public var cameraTransitionMode: CameraTransitionMode { get set } -
Zoom configuration. The default value is 150 meters. Camera zoom configuration. The default value is 150 meters. Note:
MapMeasure.Kind.scaleis not supported.Declaration
Swift
public var zoom: MapMeasure { get set } -
Camera tilt with axis parallel to the ground. The default value is 50 degrees.
Declaration
Swift
public var cameraTiltInDegrees: Double { get set } -
Camera bearing in degrees. Optional fixed bearing, from true North (0 degrees) in clockwise direction. The valid range is [0, 360]. If set, it will prevent the map from rotating to the direction of travel. For example, a value of zero results in “north up” mode. Defaults to
nil, which means the camera derives the bearing from theLocation, so that it points to the direction of travel. If this property isniland the device does not provide bearing, the last known value is used or zero otherwise.Declaration
Swift
public var cameraBearingInDegrees: Double? { get set }