NavigationOptions

public struct NavigationOptions : Equatable

A struct containing information about the navigation options

  • The boolean indicating whether the navigation manager should stop navigation when user has arrived close to the final destination. Default is true

    To set threshold distance use arrivedDistanceThreshold option.

    Declaration

    Swift

    public let stopWhenArrivedAtDestination: Bool
  • The distance measured in meters, indicating when the navigation manager considers that the user has arrived at the final destination. Default is 15 meters

    It takes into account two cases:

    • if raw user position is less than threshold
    • if calculated remaining distance is less than threshold

    Declaration

    Swift

    public let arrivedDistanceThreshold: CLLocationDistance
  • The distance measured in meters indicates when the user’s location will no longer be projected onto the itinerary and navigation will be recalculated. Default is 25 meters

    Declaration

    Swift

    public let userPositionThreshold: CLLocationDistance
  • The navigation recalculation time interval, measured in seconds, indicates the interval between consecutive navigation recalculations. An interval of less than 5 seconds is forbidden. Default is 5 seconds

    Declaration

    Swift

    public let navigationRecalculationTimeInterval: TimeInterval
  • Initializes and returns a newly allocated navigation options with the specified parameters.

    Declaration

    Swift

    public init(
        stopWhenArrivedAtDestination: Bool = true,
        arrivedDistanceThreshold: CLLocationDistance = 15,
        userPositionThreshold: CLLocationDistance = 25,
        navigationRecalculationTimeInterval: TimeInterval = 5
    )

    Parameters

    stopWhenArrivedAtDestination

    The boolean indicating whether the navigation manager should stop navigation when user has arrived close to the final destination. Default is true

    arrivedDistanceThreshold

    The distance measured in meters, indicating when the navigation manager considers that the user has arrived at the final destination. Default is 15 meters

    userPositionThreshold

    The distance measured in meters indicates when the user’s location will no longer be projected onto the itinerary and navigation will be recalculated. Default is 25 meters

    navigationRecalculationTimeInterval

    The navigation recalculation time interval, measured in seconds, indicates the interval between consecutive navigation recalculations. An interval of less than 5 seconds is forbidden. Default is 5 seconds