DynamicCameraBehavior

public class DynamicCameraBehavior : CameraBehavior
extension DynamicCameraBehavior: NativeBase
extension DynamicCameraBehavior: Hashable

Use this class to follow the current location of the user: The camera will look at the target location that was fed into the navigator instance, gradually zooming in as the user approaches each maneuver and zooming out after the user passes them. Since location updates happen in discrete intervals, locations in-between will be interpolated to achieve a smooth camera movement. If no route is set, constant values of camera distance and tilt are used.

  • 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.instant to skip the camera animation, for example when returning from a route overview to guidance. The default value is CameraTransitionMode.animated.

    Declaration

    Swift

    public var cameraTransitionMode: CameraTransitionMode { get set }