NavigatorInterface (API Reference)
Interface NavigatorInterface
- All Superinterfaces:
LocationListener
- All Known Implementing Classes:
Navigator,VisualNavigator
This interface provides the basic functionality needed to run a navigation session.
-
Method Summary
Modifier and TypeMethodDescriptioncalculateRemainingDistanceInMeters(GeoCoordinates coordinates) This method calculates the distance between the current position and given coordinates.Gets the listener to receive notifications about border crossings on the current road.Gets border crossing warning options to be passed toBorderCrossingWarningListener.Gets the listener to receive current situation lane assistance view notifications.Gets the listener to receive current danger zones notifications.Gets the listener that notify when the destination has been reached.Gets the listener to receive current environmental zones notifications.Gets the listener that notifies when a text notification is available.Gets the text notification options.Gets the listener to receive junction view lane assistance notifications.Gets the listener to receive notifications about low speed zones on the current road.getManeuver(int index) Returns maneuver at the given index.Gets the maneuver notification options.getManeuverNotificationTimingOptions(TransportMode transportMode, TimingProfile timingProfile) Returns maneuver notification timing options with default values given the combination of transport mode and timing profile.Gets the listener to receive maneuver view lane assistance notifications.Gets the listener that notifies when aMilestonehas been reached or missed.Gets the listener that notifies current location updates.Gets the listener that notifies when the off-road destination has been reached.Gets the listener that notifies about off-road progress.Gets the listener to receive post action notifications, such as a charge action at a charging station.Gets the listener to receive notifications about railway crossings on the current road.Gets the listener to receive notifications about junction views on the current road.Gets realistic view warning options that allow to filter realistic views to be passed toRealisticViewWarningListener.Gets the listener to receive notifications about attributes of the current road.Gets the listener to receive notifications about road signs on the current road.Gets road sign warning options that allow to filter road signs to be passed toRoadSignWarningListener.Gets the listener to receive notifications about the textual attributes of the current road.getRoute()Gets the route that is being navigated.Gets the listener that notifies when deviation from the route is observed.Gets the listener that notifies when a route progress change occurs.Gets the listener to receive safety camera warning notifications.Gets safety camera warning options to be passed toSafetyCameraWarningListener.Gets the listener to receive notifications about school zones on the current road.Gets school zone warning options that allow to configure school zone notifications to be passed toSchoolZoneWarningListener.Gets the listener to receive notifications about the speed limit of the current road.Gets the listener to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.Gets the speed warning options.Gets the listener to receive notifications about the the upcoming toll stop.Gets the transport profile for theNavigator, when no route is present.Gets the listener to receive notifications about merging traffic to the current road.Gets merging traffic warning options that allow to configure merging traffic notifications to be passed toTrafficMergeWarningListener.Gets the traffic information for the current route.Gets the listener to receive notifications about truck restrictions on the current road.Gets truck restrictions warning options that allow to filter truck restrictions to be passed toTruckRestrictionsWarningListener.getWarningNotificationDistances(WarningType warningType) Returns the warning notification distances for the requested warning type.booleanReturntrueif tunnel extrapolation is enabled otherwisefalse.booleanReturntrueif handling of passthrough waypoints is enabled, otherwise -false.voidCall of this function is used to trigger the navigator to repeat the last maneuver notification based on the current position.voidSets the listener to receive notifications about border crossings on the current road.voidSets border crossing warning options to be passed toBorderCrossingWarningListener.voidSets the listener to receive current situation lane assistance view notifications.voidsetCustomOption(String key, String value) This method sets custom options that controls navigator behavior.voidSets the listener to receive current danger zones notifications.voidSets the listener that notify when the destination has been reached.voidsetEnableTunnelExtrapolation(boolean value) Set totrueto enable tunnel extrapolation, set tofalseto disable tunnel extrapolation.voidSets the listener to receive current environmental zones notifications.voidSets the listener that notifies when a text notification is available.voidSets the text notification options.voidSets the listener to receive junction view lane assistance notifications.voidSets the listener to receive notifications about low speed zones on the current road.voidSets the maneuver notification options.booleansetManeuverNotificationTimingOptions(TransportMode transportMode, TimingProfile timingProfile, ManeuverNotificationTimingOptions options) Set timing option values for the combination of transport mode and timing profile.voidSets the listener to receive maneuver view lane assistance notifications.voidSets the listener that notifies when aMilestonehas been reached or missed.voidSets the listener that notifies current location updates.voidSets the listener that notifies when the off-road destination has been reached.voidSets the listener that notifies about off-road progress.voidsetPassthroughWaypointsHandlingEnabled(boolean value) Set totrueenables handling of passthrough waypoints, set tofalsedisables handling of passthrough waypoints.voidSets the listener to receive post action notifications, such as a charge action at a charging station.voidSets the listener to receive notifications about railway crossings on the current road.voidSets the listener to receive notifications about junction views on the current road.voidSets realistic view warning options that allow to filter realistic views to be passed toRealisticViewWarningListener.voidSets the listener to receive notifications about attributes of the current road.voidSets the listener to receive notifications about road signs on the current road.voidSets road sign warning options that allow to filter road signs to be passed toRoadSignWarningListener.voidSets the listener to receive notifications about the textual attributes of the current road.voidSets the route to navigate.voidSets the listener that notifies when deviation from the route is observed.voidSets the listener that notifies when a route progress change occurs.voidSets the listener to receive safety camera warning notifications.voidSets safety camera warning options to be passed toSafetyCameraWarningListener.voidSets the listener to receive notifications about school zones on the current road.voidSets school zone warning options that allow to configure school zone notifications to be passed toSchoolZoneWarningListener.voidSets the listener to receive notifications about the speed limit of the current road.voidSets the listener to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.voidSets the speed warning options.voidSets the listener to receive notifications about the upcoming toll stop.voidSets the transport profile for theNavigator, when no route is present.voidSets the listener to receive notifications about merging traffic to the current road.voidSets merging traffic warning options that allow to configure merging traffic notifications to be passed toTrafficMergeWarningListener.voidsetTrafficOnRoute(TrafficOnRoute value) Sets the traffic information for the current route.voidSets the listener to receive notifications about truck restrictions on the current road.voidSets truck restrictions warning options that allow to filter truck restrictions to be passed toTruckRestrictionsWarningListener.booleansetWarningNotificationDistances(WarningType warningType, WarningNotificationDistances warningNotificationDistances) Set the warning notification distances for the specified warning types.Methods inherited from interface com.here.sdk.core.LocationListener
onLocationUpdated
-
Method Details
-
getManeuver
Returns maneuver at the given index.
- Parameters:
index-The index of maneuver requested.
- Returns:
The maneuver if it exists or otherwise
null.
-
repeatLastManeuverNotification
void repeatLastManeuverNotification()Call of this function is used to trigger the navigator to repeat the last maneuver notification based on the current position.
-
calculateRemainingDistanceInMeters
This method calculates the distance between the current position and given coordinates. The coordinates must be on the polyline.
- Parameters:
coordinates-The geographic coordinates of the location.
- Returns:
distance in meters or null if given coordinates are not on route or given coordinates were already traversed.
-
setCustomOption
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.
- Parameters:
key-Option name
value-New option value
-
getRoute
Gets the route that is being navigated.
Gets and sets the route that is being navigated. If not set, only the current location information will be provided through
NavigableLocationListener. If set, both route progress (RouteProgressListener) and route deviation (RouteDeviationListener) will receive notifications on updates. A route may fail to be set if it is generated by an incompatible engine, in which case the operation has no effect.- Returns:
The route to navigate.
-
setRoute
Sets the route to navigate.
Gets and sets the route that is being navigated. If not set, only the current location information will be provided through
NavigableLocationListener. If set, both route progress (RouteProgressListener) and route deviation (RouteDeviationListener) will receive notifications on updates. A route may fail to be set if it is generated by an incompatible engine, in which case the operation has no effect.- Parameters:
value-The route to navigate.
-
getTrackingTransportProfile
Gets the transport profile for the
Navigator, when no route is present.Properly setting the transport profile optimizes the navigation experience, and improves resource consumption. For example, a
TransportProfilecan be defined with aVehicleProfile. A vehicle profile can have several parameters such asVehicleTypeto set the source of information describing the vehicle. The default is aVehicleType.CARprofile.Currently used members of
TransportProfileVehicleType: Sets the transport mode.- From
vehicleProfile:grossWeightInKilograms: Required for truck related speed information.heightInCentimeters: Required for truck related speed information.widthInCentimeters: Additional truck definition for more specific truck speed information.lengthInCentimeters: Additional truck definition for more specific truck speed information.
- Returns:
Defines the transport profile for the
Navigator, when no route is present.
-
setTrackingTransportProfile
Sets the transport profile for the
Navigator, when no route is present.Properly setting the transport profile optimizes the navigation experience, and improves resource consumption. For example, a
TransportProfilecan be defined with aVehicleProfile. A vehicle profile can have several parameters such asVehicleTypeto set the source of information describing the vehicle. The default is aVehicleType.CARprofile.Currently used members of
TransportProfileVehicleType: Sets the transport mode.- From
vehicleProfile:grossWeightInKilograms: Required for truck related speed information.heightInCentimeters: Required for truck related speed information.widthInCentimeters: Additional truck definition for more specific truck speed information.lengthInCentimeters: Additional truck definition for more specific truck speed information.
- Parameters:
value-Defines the transport profile for the
Navigator, when no route is present.
-
getRouteProgressListener
Gets the listener that notifies when a route progress change occurs.
Route progress notifications only occurs if the route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about navigation route progress.
-
getRouteDeviationListener
Gets the listener that notifies when deviation from the route is observed.
Route deviation notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about deviations from the route if any occurs.
-
getEventTextListener
Gets the listener that notifies when a text notification is available.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user. Note: In order to receive the text notification emitted for the traffic merge warner, whenTrafficMergeWarningOptions.enable_text_notificationhas been enabled, thesdk.navigation.EventTextListenermust be enabled as well.- Returns:
Object to receive text notifications when they are available.
-
getMilestoneStatusListener
Gets the listener that notifies when a
Milestonehas been reached or missed.It informs on all waypoints (passed or missed) that are of type
MilestoneType.STOPOVERbut excludes the starting waypoint. Waypoints of typeMilestoneType.PASSTHROUGHare excluded, by default, but can be included viaisPassthroughWaypointsHandlingEnabled(). Milestone status notifications only occurs if a route has been set. Settingnullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about the arrival at each
Milestoneor missing it.
-
getDestinationReachedListener
Gets the listener that notify when the destination has been reached.
Destination reached notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive the notification about the arrival at the destination.
-
getSpeedWarningListener
Gets the listener to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.
-
getManeuverViewLaneAssistanceListener
Gets the listener to receive maneuver view lane assistance notifications.
Maneuver view lane assistance notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive maneuver view lane assistance notifications.
-
getCurrentSituationLaneAssistanceViewListener
@Nullable CurrentSituationLaneAssistanceViewListener getCurrentSituationLaneAssistanceViewListener()Gets the listener to receive current situation lane assistance view notifications.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive current situation lane assistance view notifications.
-
getEnvironmentalZoneWarningListener
Gets the listener to receive current environmental zones notifications.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notification on approaching environmental zones.
-
getJunctionViewLaneAssistanceListener
Gets the listener to receive junction view lane assistance notifications.
Junction view lane assistance notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive junction view lane assistance notifications.
-
getSafetyCameraWarningListener
Gets the listener to receive safety camera warning notifications.
If a listener is present, notifications about safety speed cameras will be also sent via
SafetyCameraWarningListener. Settingnullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive safety camera warner notifications.
-
getSafetyCameraWarningOptions
Gets safety camera warning options to be passed to
SafetyCameraWarningListener.These options allow the enabling or disabling the text notification for the warner.
- Returns:
Safety camera warning options to be passed to
SafetyCameraWarningListener.
-
getDangerZoneWarningListener
Gets the listener to receive current danger zones notifications.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notification on approaching danger zones.
-
getTruckRestrictionsWarningListener
Gets the listener to receive notifications about truck restrictions on the current road.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about truck restrictions on the current road.
-
getTruckRestrictionsWarningOptions
Gets truck restrictions warning options that allow to filter truck restrictions to be passed to
TruckRestrictionsWarningListener.- Returns:
Truck restrictions warning options that allow to filter truck restrictions to be passed to
TruckRestrictionsWarningListener.
-
getPostActionListener
Gets the listener to receive post action notifications, such as a charge action at a charging station.
Post actions notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive post action notifications, such as a charge action at a charging station.
-
getSpeedLimitListener
Gets the listener to receive notifications about the speed limit of the current road.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about the speed limit of the current road.
-
getRoadTextsListener
Gets the listener to receive notifications about the textual attributes of the current road.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about the textual attributes of the current road.
-
getRoadAttributesListener
Gets the listener to receive notifications about attributes of the current road.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about attributes of the current road.
-
getRoadSignWarningListener
Gets the listener to receive notifications about road signs on the current road.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about road signs on the current road.
-
getRoadSignWarningOptions
Gets road sign warning options that allow to filter road signs to be passed to
RoadSignWarningListener.- Returns:
Road sign warning options that allow to filter road sings to be passed to
RoadSignWarningListener.
-
getSchoolZoneWarningListener
Gets the listener to receive notifications about school zones on the current road.
Setting
nullvalue to the listener will unset the listener. school zones on the current road. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about school zones on the current road.
-
getSchoolZoneWarningOptions
Gets school zone warning options that allow to configure school zone notifications to be passed to
SchoolZoneWarningListener.It allow to configure school zone notifications to be passed to
SchoolZoneWarningListener.- Returns:
School zone warning options
-
getRealisticViewWarningListener
Gets the listener to receive notifications about junction views on the current road.
Setting
nullvalue to the listener will unset the listener. This feature requires a map version greater or equal to 67 in order to function properly. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about junction views on the current road.
-
getRealisticViewWarningOptions
Gets realistic view warning options that allow to filter realistic views to be passed to
RealisticViewWarningListener.It allow to filter realistic views to be passed to
RealisticViewWarningListener.- This feature requires a map version greater or equal to 67 in order to function properly.
- Returns:
Realistic view warning options.
-
getBorderCrossingWarningListener
Gets the listener to receive notifications about border crossings on the current road.
Border crossing notifications are given only if a route is present. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about border crossings on the current road.
-
getBorderCrossingWarningOptions
Gets border crossing warning options to be passed to
BorderCrossingWarningListener.allow the filtering of the border crossing warnings received and set the notification distances.
- Returns:
Border crossing warning options to be passed to
BorderCrossingWarningListener. These options
-
getTollStopWarningListener
Gets the listener to receive notifications about the the upcoming toll stop.
Setting
nullvalue to the listener will unset the listener. This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.- Returns:
Object to receive information on the upcoming toll stop.
-
getRailwayCrossingWarningListener
Gets the listener to receive notifications about railway crossings on the current road.
Railway crossing notifications are given regardless if a route is set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about railway crossings on the current road.
-
getLowSpeedZoneWarningListener
Gets the listener to receive notifications about low speed zones on the current road.
Low speed zone notifications are given regardless if a route is set. This listener is currently available only for Japan. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about low speed zones on the current road.
-
getTrafficMergeWarningListener
Gets the listener to receive notifications about merging traffic to the current road.
Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive notifications about merging traffic to the current road.
-
getTrafficMergeWarningOptions
Gets merging traffic warning options that allow to configure merging traffic notifications to be passed to
TrafficMergeWarningListener.- Returns:
Merging traffic warning options that allow to configure merging traffic notifications to be passed to
TrafficMergeWarningListener.
-
getOffRoadDestinationReachedListener
Gets the listener that notifies when the off-road destination has been reached.
Off-road destination reached notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive the notification about the arrival at the off-road destination.
-
getOffRoadProgressListener
Gets the listener that notifies about off-road progress.
Off-road progress notifications only occurs if a route has been set. Setting
nullvalue to the listener will unset the listener. It returnsnullwhen no listener is set by an user.- Returns:
Object to receive the notification about the off-road progress.
-
getManeuverNotificationOptions
Gets the maneuver notification options.
Notifications are only available if a route is present.
- Returns:
Options used for maneuver notifications.
-
getEventTextOptions
Gets the text notification options.
Notifications are only available if a route is present.
- Returns:
Options used for text notifications.
-
getSpeedWarningOptions
Gets the speed warning options.
- Returns:
Options used for the speed warning feature.
-
isEnableTunnelExtrapolation
boolean isEnableTunnelExtrapolation()Return
trueif tunnel extrapolation is enabled otherwisefalse.By default the tunnel extrapolation is enabled.
- Returns:
Defines whether to enable or disable tunnel extrapolation.
-
setEnableTunnelExtrapolation
void setEnableTunnelExtrapolation(boolean value) Set to
trueto enable tunnel extrapolation, set tofalseto disable tunnel extrapolation.By default the tunnel extrapolation is enabled.
- Parameters:
value-Defines whether to enable or disable tunnel extrapolation.
-
isPassthroughWaypointsHandlingEnabled
boolean isPassthroughWaypointsHandlingEnabled()Return
trueif handling of passthrough waypoints is enabled, otherwise -false.By default the handling of passthrough waypoints is disabled.
- Returns:
Defines whether to enable or disable handling of passthrough waypoints.
-
setPassthroughWaypointsHandlingEnabled
void setPassthroughWaypointsHandlingEnabled(boolean value) Set to
trueenables handling of passthrough waypoints, set tofalsedisables handling of passthrough waypoints.By default the handling of passthrough waypoints is disabled.
- Parameters:
value-Defines whether to enable or disable handling of passthrough waypoints.
-
getTrafficOnRoute
Gets the traffic information for the current route.
This impacts
RouteProgressupdates as the duration of theSectionProgressmight change. However, the remaining distance and the route geometry will remain unchanged.- Returns:
Traffic information for the current route.
-
setTrafficOnRoute
Sets the traffic information for the current route.
This impacts
RouteProgressupdates as the duration of theSectionProgressmight change. However, the remaining distance and the route geometry will remain unchanged.- Parameters:
value-Traffic information for the current route.
-