CameraTrackingMode

public enum CameraTrackingMode : Equatable

A type that represents camera tracking modes.

  • The camera does not track the current position (aka the current location).

    Declaration

    Swift

    case none
  • North Up Follow Camera Operator, with which the camera follows the current position.

    Important

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

    Declaration

    Swift

    case follow(_: FollowCameraOperatorConfig? = FollowCameraOperatorConfig.DEFAULT_FOLLOW_CAMERA_OPERATOR_CONFIG)

    Parameters

    configuration

    Configration for follow camera operator.

  • Follow Route Camera Operator, camera follows the current position and heading, while adjusting tilt and scale to best present the route and its guidance instructions.

    Important

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

    Declaration

    Swift

    case followRoute(_: FollowCameraOperatorConfig? = FollowCameraOperatorConfig.DEFAULT_FOLLOW_ROUTE_CAMERA_OPERATOR_CONFIG)

    Parameters

    configuration

    Configration for follow camera operator.

  • Direction Up Follow Camera Operator, camera follows the current position and heading.

    Important

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

    Declaration

    Swift

    case followDirection(_: FollowCameraOperatorConfig? = FollowCameraOperatorConfig.DEFAULT_FOLLOW_DIRECTION_CAMERA_OPERATOR_CONFIG)

    Parameters

    configuration

    Configration for follow camera operator.

  • Follow Route North Up Camera Operator, camera follows the current position and heading, while adjusting tilt and scale to best present the route and its guidance instructions

    Important

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

    Declaration

    Swift

    case followRouteNorthUp(_: FollowCameraOperatorConfig? = FollowCameraOperatorConfig.DEFAULT_FOLLOW_ROUTE_CAMERA_OPERATOR_CONFIG)

    Parameters

    configuration

    Configration for follow camera operator.

  • The operator tries to fit the routes in the current view, by changing the camera zoom and look-at parameters. It constantly adjusts these parameters in order to keep the remaining part of the route(s) in view. Tilt and heading parameters are set to 0 in this camera mode.

    Declaration

    Swift

    case routeOverview

Public

  • The [follow] operator tracks the current position and heading and adjusts the camera so that the position marker is located in the lower middle section of the safe area and is always pointing up. Or, in other words, the operator ensures that the camera is following the current position and pointing in the driving direction.

    At a less detailed scale than 1:2.400.000, the operator behaves like the [followDirection].

    You can also define a custom follow operator behavior by creating a new instance of the [CameraTrackingMode.follow] case with a custom [FollowCameraOperatorConfig].

    Declaration

    Swift

    public static let follow: CameraTrackingMode
  • The [followDirection] operator tracks the current position and adjusts the camera so that the position marker is in the center of the safe area. The heading of camera is fixed to 0 (north), meaning that the position marker changes its orientation, but the map does not rotate. The tilt is set to 0.

    You can also define a custom follow direction operator behavior by creating a new instance of the [CameraTrackingMode.followDirection] case with a custom [FollowCameraOperatorConfig].

    Declaration

    Swift

    public static let followDirection: CameraTrackingMode
  • The [followRoute] operator tracks the current position and adjusts the camera so that the position marker is in the lower middle section of the safe area and is always pointing up. Or, in other words, the operator ensures the camera is following the current position and is pointing in the driving direction.

    Additionally, the operator also tracks the current route and adjusts the scale and tilt to best highlight the part of the route currently being driven, or the next upcoming guidance instruction.

    At a less detailed scale than 1:2.400.000, the operator behaves like the [followDirection].

    You can also define a custom follow route operator behavior by creating a new instance of the [CameraTrackingMode.followRoute] case with a custom [FollowCameraOperatorConfig]. This operator adjusts the scale and tilt to maximize the visibility of the incoming route instructions, according to the configuration provided in [FollowCameraOperatorConfig.ControlPoint].

    Declaration

    Swift

    public static let followRoute: CameraTrackingMode
  • The [followRouteNorthUp] operator tracks the current position and adjusts the camera so that the position marker is in the center of the safe area. The camera heading is fixed to 0 (north), meaning the position marker changes its orientation, but the map does not rotate. The tilt is set to 0.

    Additionally, the operator also tracks the current route and adjusts the scale and tilt to best highlight the part of the route being currently driven, or the next upcoming guidance instruction.

    You can also define a custom follow route operator behavior by creating a new instance of the [CameraTrackingMode.followRouteNorthUp] case with a custom [FollowCameraOperatorConfig]. This operator adjusts the scale and tilt to maximize the visibility of the incoming route instructions, according to the configuration provided in [FollowCameraOperatorConfig.ControlPoint].

    Important

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

    Declaration

    Swift

    public static let followRouteNorthUp: CameraTrackingMode