NavigatorProtocol

public protocol NavigatorProtocol : LocationDelegate

This protocol provides the basic functionality needed to run a navigation session.

  • The route to navigate.

    Declaration

    Swift

    var route: Route? { get set }
  • Defines the transport profile for the Navigator, when no route is present.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.28.0. Use `NavigatorInterface.trackingTransportSpecification` instead.")
    var trackingTransportProfile: TransportProfile? { get set }
  • Defines the transport specification for the Navigator, when no route is present.

    Declaration

    Swift

    var trackingTransportSpecification: TransportSpecification? { get set }
  • Object to receive notifications about the current location.

    Declaration

    Swift

    var navigableLocationDelegate: NavigableLocationDelegate? { get set }
  • Object to receive notifications about navigation route progress.

    Declaration

    Swift

    var routeProgressDelegate: RouteProgressDelegate? { get set }
  • Object to receive notifications about deviations from the route if any occurs.

    Declaration

    Swift

    var routeDeviationDelegate: RouteDeviationDelegate? { get set }
  • Object to receive text notifications when they are available.

    Declaration

    Swift

    var eventTextDelegate: EventTextDelegate? { get set }
  • Object to receive notifications about the arrival at each Milestone or missing it.

    Declaration

    Swift

    var milestoneStatusDelegate: MilestoneStatusDelegate? { get set }
  • Object to receive the notification about the arrival at the destination.

    Declaration

    Swift

    var destinationReachedDelegate: DestinationReachedDelegate? { get set }
  • Object to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.

    Declaration

    Swift

    var speedWarningDelegate: SpeedWarningDelegate? { get set }
  • Object to receive maneuver view lane assistance notifications.

    Declaration

    Swift

    var maneuverViewLaneAssistanceDelegate: ManeuverViewLaneAssistanceDelegate? { get set }
  • Object to receive current situation lane assistance view notifications.

    Declaration

    Swift

    var currentSituationLaneAssistanceViewDelegate: CurrentSituationLaneAssistanceViewDelegate? { get set }
  • Object to receive notification on approaching environmental zones.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var environmentalZoneWarningListenerDelegate: EnvironmentalZoneWarningDelegate? { get set }
  • Object to receive junction view lane assistance notifications.

    Declaration

    Swift

    var junctionViewLaneAssistanceDelegate: JunctionViewLaneAssistanceDelegate? { get set }
  • Object to receive safety camera warner notifications.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var safetyCameraWarningDelegate: SafetyCameraWarningDelegate? { get set }
  • Safety camera warning options to be passed to SafetyCameraWarningDelegate.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var safetyCameraWarningOptions: SafetyCameraWarningOptions { get set }
  • Object to receive notification on approaching danger zones.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var dangerZoneWarningListenerDelegate: DangerZoneWarningDelegate? { get set }
  • Object to receive notifications about truck restrictions on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var truckRestrictionsWarningDelegate: TruckRestrictionsWarningDelegate? { get set }
  • Warner engine used by the navigator.

    Declaration

    Swift

    var warnerEngine: WarnerEngine { get }
  • Truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningDelegate.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var truckRestrictionsWarningOptions: TruckRestrictionsWarningOptions { get set }
  • Object to receive post action notifications, such as a charge action at a charging station.

    Declaration

    Swift

    var postActionDelegate: PostActionDelegate? { get set }
  • Object to receive notifications about the speed limit of the current road.

    Declaration

    Swift

    var speedLimitDelegate: SpeedLimitDelegate? { get set }
  • Object to receive notifications about the textual attributes of the current road.

    Declaration

    Swift

    var roadTextsDelegate: RoadTextsDelegate? { get set }
  • Object to receive notifications about attributes of the current road.

    Declaration

    Swift

    var roadAttributesDelegate: RoadAttributesDelegate? { get set }
  • Object to receive notifications about road signs on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var roadSignWarningDelegate: RoadSignWarningDelegate? { get set }
  • Road sign warning options that allow to filter road sings to be passed to RoadSignWarningDelegate.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var roadSignWarningOptions: RoadSignWarningOptions { get set }
  • Object to receive notifications about school zones on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var schoolZoneWarningDelegate: SchoolZoneWarningDelegate? { get set }
  • School zone warning options

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var schoolZoneWarningOptions: SchoolZoneWarningOptions { get set }
  • Object to receive notifications about junction views on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var realisticViewWarningDelegate: RealisticViewWarningDelegate? { get set }
  • Realistic view warning options.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var realisticViewWarningOptions: RealisticViewWarningOptions { get set }
  • Object to receive notifications about border crossings on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var borderCrossingWarningDelegate: BorderCrossingWarningDelegate? { get set }
  • Border crossing warning options to be passed to BorderCrossingWarningDelegate. These options

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var borderCrossingWarningOptions: BorderCrossingWarningOptions { get set }
  • Object to receive information on the upcoming toll stop.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var tollStopWarningDelegate: TollStopWarningDelegate? { get set }
  • Object to receive notifications about railway crossings on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var railwayCrossingWarningDelegate: RailwayCrossingWarningDelegate? { get set }
  • Object to receive notifications about low speed zones on the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var lowSpeedZoneWarningDelegate: LowSpeedZoneWarningDelegate? { get set }
  • Object to receive notifications about merging traffic to the current road.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.addWarningListener(﹚` method with own `WarningListener` implementation as parameter instead.")
    var trafficMergeWarningDelegate: TrafficMergeWarningDelegate? { get set }
  • Merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningDelegate.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.WarningOptions` property to change these options instead.")
    var trafficMergeWarningOptions: TrafficMergeWarningOptions { get set }
  • Object to receive the notification about the arrival at the off-road destination.

    Declaration

    Swift

    var offRoadDestinationReachedDelegate: OffRoadDestinationReachedDelegate? { get set }
  • Object to receive the notification about the off-road progress.

    Declaration

    Swift

    var offRoadProgressDelegate: OffRoadProgressDelegate? { get set }
  • Options used for maneuver notifications.

    Declaration

    Swift

    var maneuverNotificationOptions: ManeuverNotificationOptions { get set }
  • Options used for text notifications.

    Declaration

    Swift

    var eventTextOptions: EventTextOptions { get set }
  • Options used for the speed warning feature.

    Declaration

    Swift

    var speedWarningOptions: SpeedWarningOptions { get set }
  • Defines whether to enable or disable tunnel extrapolation.

    Declaration

    Swift

    var isEnableTunnelExtrapolation: Bool { get set }
  • Defines whether to enable or disable handling of passthrough waypoints.

    Declaration

    Swift

    var isPassthroughWaypointsHandlingEnabled: Bool { get set }
  • Traffic information for the current route.

    Declaration

    Swift

    var trafficOnRoute: TrafficOnRoute? { get set }
  • The location manager used by the navigator for map-matched location processing.

    Declaration

    Swift

    var locationManager: LocationManager { get }
  • Called each time a new location is available. In a navigation context while using the Navigator or VisualNavigator, it’s required to set the Location.time parameter for each Location object so that the HERE SDK can map-match the locations properly. If the Location.time parameter is missing, the location will be ignored. For navigation, it is also recommended to provide the bearing and speed parameters for each Location object. Invoked on the main thread.

    Declaration

    Swift

    func onLocationUpdated(_ location: Location)

    Parameters

    location

    Current location.

  • Returns maneuver at the given index.

    Declaration

    Swift

    func getManeuver(index: Int32) -> Maneuver?

    Parameters

    index

    The index of maneuver requested.

    Return Value

    The maneuver if it exists or otherwise nil.

  • Returns maneuver notification timing options with default values given the combination of transport mode and timing profile. The return value can be used as the base for configuring maneuver notification timings. Configure the relevant attributes of this object according to your preferences, and then set it by calling setManeuverNotificationTimingOptions function for the same combination of transport mode and timing profile.

    Declaration

    Swift

    func getManeuverNotificationTimingOptions(transportMode: TransportMode, timingProfile: TimingProfile) -> ManeuverNotificationTimingOptions

    Parameters

    transportMode

    The transport mode of the timing options.

    timingProfile

    The timing profile of the timing options.

    Return Value

    The timing options with default values.

  • Set timing option values for the combination of transport mode and timing profile.

    Declaration

    Swift

    @discardableResult
    func setManeuverNotificationTimingOptions(transportMode: TransportMode, timingProfile: TimingProfile, options: ManeuverNotificationTimingOptions) -> Bool

    Parameters

    transportMode

    The transport mode of the timing options.

    timingProfile

    The timing profile of the timing options.

    options

    The timing options.

    Return Value

    True if set successfully, false when options has invalid value, see ManeuverNotificationTimingOptions for more details about options.

  • Returns the warning notification distances for the requested warning type. The return value can be used as the base for configuring warning notification distances. Configure the relevant attributes of this object according to your preferences, and then set it by calling setWarningNotificationDistances function with the same warning type and the modified warning notification distances object.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.getWarningNotificationDistances(﹚` method instead.")
    func getWarningNotificationDistances(warningType: WarningType) -> WarningNotificationDistances

    Parameters

    warningType

    The warning type for which the notification distances will be returned.

    Return Value

    The notification distances for the given warning type.

  • Set the warning notification distances for the specified warning types. Note: The warning notification distances are set for most warners. This method can’t be used to set the warning notification distance for the School Zone warning type because it is applicable regardless of the timing profile. Use NavigatorInterface.school_zone_warning_options instead. Attempting to set the warning notification distances for the school zone warner using the NavigatorInterface.set_warning_notification_distances method will fail and return false. Always use SchoolZoneWarningOptions.warning_distance_in_meters to set the warning notification distance for the school zone warner regardless of the TimingProfile. If NavigatorInterface.set_warning_notification_distances could be used, this would allow for different distances to be set for each timing profile, which is undesirable. Attempting to set the warning notification distances for the traffic merge warner using the NavigatorInterface.set_warning_notification_distances method will fail and return false. Always use TrafficMergeWarningOptions.warning_distance_in_meters to set the warning notification distance for the traffic merge warner regardless of the TimingProfile. Using the NavigatorInterface.set_warning_notification_distances method will fail and return false to avoid seting different distances on each timing profile since the traffic merge warning is only applicable on highways.

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v4.29.0. Use the `WarnerEngine.setWarningNotificationDistances(﹚` method instead.")
    @discardableResult
    func setWarningNotificationDistances(warningType: WarningType, warningNotificationDistances: WarningNotificationDistances) -> Bool

    Parameters

    warningType

    The warning type for which the warning notification distances will be set.

    warningNotificationDistances

    The warning notification distances to be set for the specified warning types.

    Return Value

    True if set successfully, false when the warning_type is [WarningType.SCHOOL_ZONE] or the options have invalid values, see WarningNotificationDistances for more details about warning notification distances.

  • Call of this function is used to trigger the navigator to repeat the last maneuver notification based on the current position.

    Declaration

    Swift

    func repeatLastManeuverNotification()
  • This method calculates the distance between the current position and given coordinates. The coordinates must be on the polyline.

    Declaration

    Swift

    func calculateRemainingDistanceInMeters(coordinates: GeoCoordinates) -> Int32?

    Parameters

    coordinates

    The geographic coordinates of the location.

    Return Value

    distance in meters or null if given coordinates are not on route or given coordinates were already traversed.

  • This method sets custom options that controls navigator behavior. Unsupported options are silently ignored. Undocumented options can change their meaning without going through deprecation process.

    Declaration

    Swift

    func setCustomOption(key: String, value: String)

    Parameters

    key

    Option name

    value

    New option value