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
var trackingTransportProfile: TransportProfile? { 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
Milestoneor 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
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
var safetyCameraWarningDelegate: SafetyCameraWarningDelegate? { get set } -
Safety camera warning options to be passed to
SafetyCameraWarningDelegate.Declaration
Swift
var safetyCameraWarningOptions: SafetyCameraWarningOptions { get set } -
Object to receive notification on approaching danger zones.
Declaration
Swift
var dangerZoneWarningListenerDelegate: DangerZoneWarningDelegate? { get set } -
Object to receive notifications about truck restrictions on the current road.
Declaration
Swift
var truckRestrictionsWarningDelegate: TruckRestrictionsWarningDelegate? { get set } -
Truck restrictions warning options that allow to filter truck restrictions to be passed to
TruckRestrictionsWarningDelegate.Declaration
Swift
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
var roadSignWarningDelegate: RoadSignWarningDelegate? { get set } -
Road sign warning options that allow to filter road sings to be passed to
RoadSignWarningDelegate.Declaration
Swift
var roadSignWarningOptions: RoadSignWarningOptions { get set } -
Object to receive notifications about school zones on the current road.
Declaration
Swift
var schoolZoneWarningDelegate: SchoolZoneWarningDelegate? { get set } -
School zone warning options
Declaration
Swift
var schoolZoneWarningOptions: SchoolZoneWarningOptions { get set } -
Object to receive notifications about junction views on the current road.
Declaration
Swift
var realisticViewWarningDelegate: RealisticViewWarningDelegate? { get set } -
Realistic view warning options.
Declaration
Swift
var realisticViewWarningOptions: RealisticViewWarningOptions { get set } -
Object to receive notifications about border crossings on the current road.
Declaration
Swift
var borderCrossingWarningDelegate: BorderCrossingWarningDelegate? { get set } -
Border crossing warning options to be passed to
BorderCrossingWarningDelegate. These optionsDeclaration
Swift
var borderCrossingWarningOptions: BorderCrossingWarningOptions { get set } -
Object to receive information on the upcoming toll stop.
Declaration
Swift
var tollStopWarningDelegate: TollStopWarningDelegate? { get set } -
Object to receive notifications about railway crossings on the current road.
Declaration
Swift
var railwayCrossingWarningDelegate: RailwayCrossingWarningDelegate? { get set } -
Object to receive notifications about low speed zones on the current road.
Declaration
Swift
var lowSpeedZoneWarningDelegate: LowSpeedZoneWarningDelegate? { get set } -
Object to receive notifications about merging traffic to the current road.
Declaration
Swift
var trafficMergeWarningDelegate: TrafficMergeWarningDelegate? { get set } -
Merging traffic warning options that allow to configure merging traffic notifications to be passed to
TrafficMergeWarningDelegate.Declaration
Swift
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 } -
Called each time a new location is available. In a navigation context while using the
NavigatororVisualNavigator, it’s required to set theLocation.timeparameter for eachLocationobject so that the HERE SDK can map-match the locations properly. If theLocation.timeparameter is missing, the location will be ignored. For navigation, it is also recommended to provide thebearingandspeedparameters for eachLocationobject. Invoked on the main thread.Declaration
Swift
func onLocationUpdated(_ location: Location)Parameters
locationCurrent location.
-
Returns maneuver at the given index.
Declaration
Swift
func getManeuver(index: Int32) -> Maneuver?Parameters
indexThe 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) -> ManeuverNotificationTimingOptionsParameters
transportModeThe transport mode of the timing options.
timingProfileThe 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) -> BoolParameters
transportModeThe transport mode of the timing options.
timingProfileThe timing profile of the timing options.
optionsThe timing options.
Return Value
Trueif set successfully,falsewhen options has invalid value, seeManeuverNotificationTimingOptionsfor 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
setWarningNotificationDistancesfunction with the same warning type and the modified warning notification distances object.Declaration
Swift
func getWarningNotificationDistances(warningType: WarningType) -> WarningNotificationDistancesParameters
warningTypeThe 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_optionsinstead. Attempting to set the warning notification distances for the school zone warner using theNavigatorInterface.set_warning_notification_distancesmethod will fail and returnfalse. Always useSchoolZoneWarningOptions.warning_distance_in_metersto set the warning notification distance for the school zone warner regardless of theTimingProfile. IfNavigatorInterface.set_warning_notification_distancescould 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 theNavigatorInterface.set_warning_notification_distancesmethod will fail and returnfalse. Always useTrafficMergeWarningOptions.warning_distance_in_metersto set the warning notification distance for the traffic merge warner regardless of theTimingProfile. Using theNavigatorInterface.set_warning_notification_distancesmethod will fail and returnfalseto avoid seting different distances on each timing profile since the traffic merge warning is only applicable on highways.Declaration
Swift
@discardableResult func setWarningNotificationDistances(warningType: WarningType, warningNotificationDistances: WarningNotificationDistances) -> BoolParameters
warningTypeThe warning type for which the warning notification distances will be set.
warningNotificationDistancesThe warning notification distances to be set for the specified warning types.
Return Value
Trueif set successfully,falsewhen the warning_type is [WarningType.SCHOOL_ZONE] or the options have invalid values, seeWarningNotificationDistancesfor 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
coordinatesThe 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
keyOption name
valueNew option value