Class VisualNavigator

java.lang.Object
com.here.NativeBase
com.here.sdk.navigation.VisualNavigator
All Implemented Interfaces:
LocationListener, NavigatorInterface

public final class VisualNavigator extends NativeBase implements NavigatorInterface

This class provides all functionality of NavigatorInterface. In addition, it provides advanced rendering capabilities for a smooth navigation experience. This includes interpolation of location updates along a route during turn-by-turn navigation and during tracking mode. By default, suitable map view settings are automatically applied. For example, a predefined current location marker is rendered. Similar to Navigator, this class continuously reacts to new locations provided from a location source and acts as a LocationListener. Note that the VisualNavigator takes control of the MapView's (maximum) frame rate when rendering, i.e., between startRendering(com.here.sdk.mapview.MapViewBase) and stopRendering() calls. It overwrites the MapView's frame rate when some camera behavior is set using the getGuidanceFrameRate(). When no camera behavior is preset, the original MapView's frame rate (the value prior to the startRendering(com.here.sdk.mapview.MapViewBase) call) will be used. While the VisualNavigator is rendering, direct changes in the MapView's frame rate can lead to unexpected behavior and therefore should be avoided.

  • Constructor Details

  • Method Details

    • getAvailableLanguagesForManeuverNotifications

      @NonNull public static List<LanguageCode> getAvailableLanguagesForManeuverNotifications()

      Returns the list of languages for maneuver notification currently available in the SDK.

      Returns:

      the list of languages for maneuver notification currently available in the SDK.

    • startRendering

      public void startRendering(@NonNull MapViewBase mapView)

      Starts visual navigation rendering. A preconfigured current location marker is shown as soon as a location is received. The marker is chosen according to the transport mode specified in the route. If no route is present, the marker is chosen based on the NavigatorInterface.getTrackingTransportProfile() property. Calling startRendering() changes the MapCamera.getPrincipalPoint() property so that the current position indicator is equal to the value from CameraBehavior.getNormalizedPrincipalPoint(), in which by default places the principal point slightly at the bottom of the mapview. It is restored to its original value when stopRendering() is called. Note: When rendering is started again for a new map view instance, rendering is automatically stopped on the previous map view instance. Also note that the MapViewBase.getFrameRate() can be lowered to reduce CPU usage, to adjust for tradeoffs between rendering smoothness versus battery consumption.

      Parameters:
      mapView -

      The map view on which visual navigation will take place.

    • stopRendering

      public void stopRendering()

      Stops visual navigation rendering. This removes the current location marker. Other settings, like map orientation or camera distance, which may have been altered during rendering are no longer updated.

    • defaultRouteManeuverArrowMeasureDependentWidths

      @NonNull public static Map<MapMeasure,Double> defaultRouteManeuverArrowMeasureDependentWidths()

      Retrieves a dictionary of default route and maneuver arrow widths as a function of MapMeasures.

      Returns:

      A dictionary of default route and maneuver arrow widths as a function of MapMeasures.

    • getCameraBehavior

      @Nullable public CameraBehavior getCameraBehavior()

      Gets the currently set camera behavior.

      Setting null disables any camera behavior with the result that the camera does not follow the current location and keeps the last active camera state, i.e., current zoom and tilt. Furthermore, when null is set map gestures can be used again to freely pan and zoom the map. In opposition, when a camera behavior is defined, then the map cannot be panned and zoomed by the user. The default value is an instance of FixedCameraBehavior.

      Returns:

      Camera behavior which defines how the VisualNavigator handles the camera.

    • setCameraBehavior

      public void setCameraBehavior(@Nullable CameraBehavior value)

      Sets how the VisualNavigator handles the camera.

      Setting null disables any camera behavior with the result that the camera does not follow the current location and keeps the last active camera state, i.e., current zoom and tilt. Furthermore, when null is set map gestures can be used again to freely pan and zoom the map. In opposition, when a camera behavior is defined, then the map cannot be panned and zoomed by the user. The default value is an instance of FixedCameraBehavior.

      Parameters:
      value -

      Camera behavior which defines how the VisualNavigator handles the camera.

    • isRouteVisible

      public boolean isRouteVisible()

      Gets the current state of route rendering during visual navigation.

      When enabled, the set Route will be rendered as a MapPolyline together with MapArrow items that indicate the next turns. By default, it is enabled. When disabled, MapArrow items are still rendered. To hide arrows, use VisualNavigatorColors with transparent color.

      Returns:

      Route visibility which defines whether to perform route rendering during visual navigation.

    • setRouteVisible

      public void setRouteVisible(boolean value)

      Sets whether to perform route rendering during visual navigation.

      When enabled, the set Route will be rendered as a MapPolyline together with MapArrow items that indicate the next turns. By default, it is enabled. When disabled, MapArrow items are still rendered. To hide arrows, use VisualNavigatorColors with transparent color.

      Parameters:
      value -

      Route visibility which defines whether to perform route rendering during visual navigation.

    • isRouteProgressVisible

      public boolean isRouteProgressVisible()

      Gets the current state of route progress during visual navigation.

      By default, it is enabled.

      Returns:

      RouteProgress visibility which defines whether to perform route progress coloring ("eat-up") during visual navigation.

    • setRouteProgressVisible

      public void setRouteProgressVisible(boolean value)

      Sets whether to perform route progress coloring ("eat-up") during visual navigation.

      By default, it is enabled.

      Parameters:
      value -

      RouteProgress visibility which defines whether to perform route progress coloring ("eat-up") during visual navigation.

    • isManeuverArrowsVisible

      public boolean isManeuverArrowsVisible()

      Gets the current state of maneuver arrow rendering during visual navigation.

      By default, it is enabled.

      Returns:

      Maneuver arrows visibility which defines whether to perform maneuver arrow rendering during visual navigation.

    • setManeuverArrowsVisible

      public void setManeuverArrowsVisible(boolean value)

      Sets whether to perform maneuver arrow rendering during visual navigation.

      By default, it is enabled.

      Parameters:
      value -

      Maneuver arrows visibility which defines whether to perform maneuver arrow rendering during visual navigation.

    • isOffRoadDestinationVisible

      public boolean isOffRoadDestinationVisible()

      Gets the current state of off-road destination visualization during visual navigation.

      Note: The dashed line will be drawn only if the original destination is off-road.

      Returns:

      Off road destination visibility which defines whether to show a dashed line between the map-matched and the original destination which is off-road. By default it is enabled.

    • setOffRoadDestinationVisible

      public void setOffRoadDestinationVisible(boolean value)

      Sets whether to show a dashed line between the map-matched and the original destination which is off-road.

      Note: The dashed line will be drawn only if the original destination is off-road.

      Parameters:
      value -

      Off road destination visibility which defines whether to show a dashed line between the map-matched and the original destination which is off-road. By default it is enabled.

    • isTrafficOnRouteVisible

      public boolean isTrafficOnRouteVisible()

      Gets the current state whether traffic conditions on route should be displayed during visual navigation.

      When enabled the route's MapPolyline will be enhanced with visualization of the traffic conditions. Colors used for this visualization are defined in VisualNavigatorColors.getTrafficOnRouteColors(). The presented traffic information is either set by the user via NavigatorInterface.getTrafficOnRoute() or is generated from historical traffic data stored in the map. Note: VisualNavigator does not perform automatic traffic data updates. The updated traffic information is available through the [sdk.routing.RoutingEngine.calculate_traffic_on_route] interface. The returned TrafficOnRoute could then be used to update [sdk.navigation.NavigatorInterface.traffic_on_route] to refresh the traffic on route visualization. Defaults to false.

      Returns:

      A boolean which defines whether to perform rendering of traffic conditions on the route when Route visualization is enabled during visual navigation.

    • setTrafficOnRouteVisible

      public void setTrafficOnRouteVisible(boolean value)

      Sets whether to perform rendering of traffic conditions on the route when Route visualization is enabled during visual navigation.

      When enabled the route's MapPolyline will be enhanced with visualization of the traffic conditions. Colors used for this visualization are defined in VisualNavigatorColors.getTrafficOnRouteColors(). The presented traffic information is either set by the user via NavigatorInterface.getTrafficOnRoute() or is generated from historical traffic data stored in the map. Note: VisualNavigator does not perform automatic traffic data updates. The updated traffic information is available through the [sdk.routing.RoutingEngine.calculate_traffic_on_route] interface. The returned TrafficOnRoute could then be used to update [sdk.navigation.NavigatorInterface.traffic_on_route] to refresh the traffic on route visualization. Defaults to false.

      Parameters:
      value -

      A boolean which defines whether to perform rendering of traffic conditions on the route when Route visualization is enabled during visual navigation.

    • getCustomLocationIndicator

      @Nullable public LocationIndicator getCustomLocationIndicator()

      Gets the currently set LocationIndicator.

      If set, the user is responsible for adding and removing the object to/from the mapview. It is important to stop sending location updates to the provided LocationIndicator, since VisualNavigator will control its position when rendering is active, i.e., between startRendering() and stopRendering() calls. By default this property is null, which means the default indicator is used, and VisualNavigator automatically adds and removes it to/from the mapview upon startRendering() and stopRendering() calls.

      Returns:

      Custom location indicator LocationIndicator which VisualNavigator uses instead of the default.

    • setCustomLocationIndicator

      public void setCustomLocationIndicator(@Nullable LocationIndicator value)

      Sets a custom LocationIndicator, so that VisualNavigator uses the provided one instead of the default.

      If set, the user is responsible for adding and removing the object to/from the mapview. It is important to stop sending location updates to the provided LocationIndicator, since VisualNavigator will control its position when rendering is active, i.e., between startRendering() and stopRendering() calls. By default this property is null, which means the default indicator is used, and VisualNavigator automatically adds and removes it to/from the mapview upon startRendering() and stopRendering() calls.

      Parameters:
      value -

      Custom location indicator LocationIndicator which VisualNavigator uses instead of the default.

    • getInterpolatedLocationListener

      @Nullable public InterpolatedLocationListener getInterpolatedLocationListener()

      Gets the listener that receives interpolated locations. For example, to pan a second instance of a MapViewBase or move additional markers smoothly. The map-matched locations are used if available, otherwise the non-map-matched ones are used instead.

      For example, to pan a second instance of a MapViewBase or move additional markers smoothly. The map-matched locations are used if available, otherwise the non-map-matched ones are used instead. Defaults to null.

      Returns:

      Object to receive interpolated locations.

    • setInterpolatedLocationListener

      public void setInterpolatedLocationListener(@Nullable InterpolatedLocationListener value)

      Sets the listener that receives interpolated locations.

      For example, to pan a second instance of a MapViewBase or move additional markers smoothly. The map-matched locations are used if available, otherwise the non-map-matched ones are used instead. Defaults to null.

      Parameters:
      value -

      Object to receive interpolated locations.

    • isRendering

      public boolean isRendering()

      Returns a value indicating whether visual navigation rendering is enabled.

      Returns:

      Returns a value indicating whether visual navigation rendering is enabled.

    • getColors

      @NonNull public VisualNavigatorColors getColors()

      Gets an object containing colors used to render route progress and maneuver arrow visualization.

      Setting a new instance overwrites the default color settings as specified in VisualNavigatorColors.

      Returns:

      Object containing colors used to render route progress and maneuver arrow visualization.

    • setColors

      public void setColors(@NonNull VisualNavigatorColors value)

      Sets an object containing colors used to render route progress and maneuver arrow visualization.

      Setting a new instance overwrites the default color settings as specified in VisualNavigatorColors.

      Parameters:
      value -

      Object containing colors used to render route progress and maneuver arrow visualization.

    • getMeasureDependentWidth

      @NonNull public Map<MapMeasure,Double> getMeasureDependentWidth()

      Gets the MapMeasure dependent polyline and maneuver arrow width in pixels.

      It is a dictionary that has keys that are MapMeasures and values that are width in pixels at this MapMeasures. This route and maneuver arrows width is multiplied by a pixel_scale MapViewBase.getPixelScale() before being rendered. The maneuver arrow width is additionally multiplied by a factor configurable with setManeuverArrowWidthFactor; which by default equals one. The function defined by a dictionary is linearly interpolated between each successive pair of data points. For keys below the lowest MapMeasure, its corresponding value width is used. For keys above the highest MapMeasure, its corresponding value width is used. Only MapMeasure of [sdk.mapview.MapMeasure.Kind.ZOOM_LEVEL] type are supported. MapMeasure of other unsupported types will be ignored. measureDependentWidth with a single entry is equivalent to use of the constant width value of this single entry for all MapMeasures. Empty measureDependentWidth is ignored and existing dictionary of width is maintained. The width values should be positive. Dictionary entries with width values less than or equal to 0 are ignored. If route and maneuver arrows were not configured with this property, then measureDependentWidth contains predefined values chosen to be optimal for different route classes.

      Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

      Returns:

      The measureDependentWidth that defines the route and maneuver arrows width.

    • setMeasureDependentWidth

      public void setMeasureDependentWidth(@NonNull Map<MapMeasure,Double> value)

      Sets the MapMeasure dependent route and maneuver arrows width in pixels.

      It is a dictionary that has keys that are MapMeasures and values that are width in pixels at this MapMeasures. This route and maneuver arrows width is multiplied by a pixel_scale MapViewBase.getPixelScale() before being rendered. The maneuver arrow width is additionally multiplied by a factor configurable with setManeuverArrowWidthFactor; which by default equals one. The function defined by a dictionary is linearly interpolated between each successive pair of data points. For keys below the lowest MapMeasure, its corresponding value width is used. For keys above the highest MapMeasure, its corresponding value width is used. Only MapMeasure of [sdk.mapview.MapMeasure.Kind.ZOOM_LEVEL] type are supported. MapMeasure of other unsupported types will be ignored. measureDependentWidth with a single entry is equivalent to use of the constant width value of this single entry for all MapMeasures. Empty measureDependentWidth is ignored and existing dictionary of width is maintained. The width values should be positive. Dictionary entries with width values less than or equal to 0 are ignored. If route and maneuver arrows were not configured with this property, then measureDependentWidth contains predefined values chosen to be optimal for different route classes.

      Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

      Parameters:
      value -

      The measureDependentWidth that defines the route and maneuver arrows width.

    • getManeuverArrowWidthFactor

      public double getManeuverArrowWidthFactor()

      Gets the factor that multiplies width of the maneuver arrow defined by getMeasureDependentWidth(). By default it is set to one.

      The factor should be positive. A value less than or equal to 0 is ignored. By default it is set to one.

      Returns:

      A factor of getMeasureDependentWidth() defining the width of the maneuver arrow.

    • setManeuverArrowWidthFactor

      public void setManeuverArrowWidthFactor(double value)

      Sets the factor that multiplies the width of the maneuver arrow defined by the getMeasureDependentWidth().

      The factor should be positive. A value less than or equal to 0 is ignored. By default it is set to one.

      Parameters:
      value -

      A factor of getMeasureDependentWidth() defining the width of the maneuver arrow.

    • isExtrapolationEnabled

      public boolean isExtrapolationEnabled()

      Gets the current state of the position extrapolation logic.

      The predicted location follows the geometry of the route (or road) ahead. By default it is enabled.

      Returns:

      Defines whether the position extrapolation logic is enabled or not.

    • setExtrapolationEnabled

      public void setExtrapolationEnabled(boolean value)

      Sets whether to enable or disable the position extrapolation logic. By default enabled.

      The predicted location follows the geometry of the route (or road) ahead. By default it is enabled.

      Parameters:
      value -

      Defines whether the position extrapolation logic is enabled or not.

    • getDebugGpxFilePath

      @Nullable public String getDebugGpxFilePath()

      Gets the path of the GPX file, is any available, currently being displayed on the map.

      Note: This API should be used for debugging purposes only.

      Returns:

      Show the contents of a GPX file on the map.

    • setDebugGpxFilePath

      public void setDebugGpxFilePath(@Nullable String value)

      Sets the path of a GPX file to be displayed on the map. Setting null removes it from the map.

      Note: This API should be used for debugging purposes only.

      Parameters:
      value -

      Show the contents of a GPX file on the map.

    • isDebugModeEnabled

      public boolean isDebugModeEnabled()

      Gets the current debug mode state.

      • A semi-transparent location marker indicating the map-matched location.
      • A gray, semi-transparent location marker indicating the raw (or original) input location.
      • A red polyline indicating the most probable path.
      • A SVG overlay, on the middle-left of the screen, showing the following:
        • IN - Input location: coordinates [bearing] [speed] [accuracy]
        • RM - Route-matched location: coordinates bearing (distance-to-raw-location)
        • MM - Map-Matched location: coordinates bearing (distance-to-raw-location)
        • RM-MM - distance-between-route-and-map-matched-locations
        • RP - Route progress: remaining-duration remaining-distance
        • SP - Section progress: section-index/sections-count remaining-duration remaining-distance
        • MP - Maneuver progress: maneuver-index remaining-duration remaining-distance
        • CPU - CPU usage: cpu-usage current-date-time
        • MS - Milestone status: section-index MISSED|REACHED when
        • RD - Route deviation: last-traveled-section-index last-traveled-section-distance when
        • FPS - Frames per second: frames-per-second

      Fields between brackets ([]'s) are omitted if not available.

      Example:

       IN: 53.96880,14.77903 167° 8m/s
       RM: 53.96880,14.77903 167° (0.0m)
       MM: 53.96879,14.77903 167° (0.5m)
       RM-MM: 0.5m
       RP: 49h0m3s 4302km
       SP: 0/16 1h2m20s 58km
       MP: 1 5s 25m
       CPU: 7% 2024-01-01 13:21:59
       MS: 1 REACHED 12:34:22
       RD: 2 345m 11:13:55
       FPS: 30.0
       

      Note: This API should be used for debugging purposes only.

      Returns:

      When enabled, it shows useful information for debugging purposes.

    • setDebugModeEnabled

      public void setDebugModeEnabled(boolean value)

      Sets whether to enable debug mode or not.

      • A semi-transparent location marker indicating the map-matched location.
      • A gray, semi-transparent location marker indicating the raw (or original) input location.
      • A red polyline indicating the most probable path.
      • A SVG overlay, on the middle-left of the screen, showing the following:
        • IN - Input location: coordinates [bearing] [speed] [accuracy]
        • RM - Route-matched location: coordinates bearing (distance-to-raw-location)
        • MM - Map-Matched location: coordinates bearing (distance-to-raw-location)
        • RM-MM - distance-between-route-and-map-matched-locations
        • RP - Route progress: remaining-duration remaining-distance
        • SP - Section progress: section-index/sections-count remaining-duration remaining-distance
        • MP - Maneuver progress: maneuver-index remaining-duration remaining-distance
        • CPU - CPU usage: cpu-usage current-date-time
        • MS - Milestone status: section-index MISSED|REACHED when
        • RD - Route deviation: last-traveled-section-index last-traveled-section-distance when
        • FPS - Frames per second: frames-per-second

      Fields between brackets ([]'s) are omitted if not available.

      Example:

       IN: 53.96880,14.77903 167° 8m/s
       RM: 53.96880,14.77903 167° (0.0m)
       MM: 53.96879,14.77903 167° (0.5m)
       RM-MM: 0.5m
       RP: 49h0m3s 4302km
       SP: 0/16 1h2m20s 58km
       MP: 1 5s 25m
       CPU: 7% 2024-01-01 13:21:59
       MS: 1 REACHED 12:34:22
       RD: 2 345m 11:13:55
       FPS: 30.0
       

      Note: This API should be used for debugging purposes only.

      Parameters:
      value -

      When enabled, it shows useful information for debugging purposes.

    • isLocationAccuracyVisualized

      public boolean isLocationAccuracyVisualized()

      Gets a boolean indicating if the halo accuracy visualization of the default LocationIndicator is rendered or not.

      Does not affect halo accuracy indicator of the getCustomLocationIndicator(). If getCustomLocationIndicator() is set, then its halo accuracy indicator can be controlled using LocationIndicator.isAccuracyVisualized().

      Returns:

      Controls if the halo accuracy visualization of the default LocationIndicator is rendered or not.

    • setLocationAccuracyVisualized

      public void setLocationAccuracyVisualized(boolean value)

      Sets the halo accuracy visualization of the default LocationIndicator.

      Does not affect halo accuracy indicator of the getCustomLocationIndicator(). If getCustomLocationIndicator() is set, then its halo accuracy indicator can be controlled using LocationIndicator.isAccuracyVisualized().

      Parameters:
      value -

      Controls if the halo accuracy visualization of the default LocationIndicator is rendered or not.

    • isDynamicFrameRateEnabled

      public boolean isDynamicFrameRateEnabled()

      Controls whether the number of map updates is dynamically calculated based on the current zoom level. If the zoom level is low, i.e., the camera target distance is high, updates to LocationIndicator, MapCamera and MapPolylines representing the route progress will happen less frequent. It is on by default.

      Returns:

      Flag used to enable or disable the dynamic frame rate.

    • setDynamicFrameRateEnabled

      public void setDynamicFrameRateEnabled(boolean value)

      Controls whether the number of map updates is dynamically calculated based on the current zoom level. If the zoom level is low, i.e., the camera target distance is high, updates to LocationIndicator, MapCamera and MapPolylines representing the route progress will happen less frequent. It is on by default.

      Parameters:
      value -

      Flag used to enable or disable the dynamic frame rate.

    • getGuidanceFrameRate

      public int getGuidanceFrameRate()

      Frame rate used during guidance. Default is 30fps.

      Returns:

      Frame rate used during guidance.

    • setGuidanceFrameRate

      public void setGuidanceFrameRate(int value)

      Frame rate used during guidance. Default is 30fps.

      Parameters:
      value -

      Frame rate used during guidance.

    • getRouteDrawOrder

      public int getRouteDrawOrder()

      The draw order of the polylines representing the route. For more details see MapPolyline.getDrawOrder(). The default is 0.

      Returns:

      The draw order of the polylines representing the route.

    • setRouteDrawOrder

      public void setRouteDrawOrder(int value)

      The draw order of the polylines representing the route. For more details see MapPolyline.getDrawOrder(). The default is 0.

      Parameters:
      value -

      The draw order of the polylines representing the route.

    • getRouteDrawOrderType

      @NonNull public DrawOrderType getRouteDrawOrderType()

      The draw order type of the polylines representing the route. For more details see MapPolyline.getDrawOrderType(). The default is DrawOrderType.MAP_SCENE_ADDITION_ORDER_DEPENDENT.

      Returns:

      The draw order type of the polylines representing the route.

    • setRouteDrawOrderType

      public void setRouteDrawOrderType(@NonNull DrawOrderType value)

      The draw order type of the polylines representing the route. For more details see MapPolyline.getDrawOrderType(). The default is DrawOrderType.MAP_SCENE_ADDITION_ORDER_DEPENDENT.

      Parameters:
      value -

      The draw order type of the polylines representing the route.

    • getManeuver

      @Nullable public Maneuver getManeuver(int index)

      Returns maneuver at the given index.

      Specified by:
      getManeuver in interface NavigatorInterface
      Parameters:
      index -

      The index of maneuver requested.

      Returns:

      The maneuver if it exists or otherwise null.

    • getManeuverNotificationTimingOptions

      @NonNull public ManeuverNotificationTimingOptions getManeuverNotificationTimingOptions(@NonNull TransportMode transportMode, @NonNull TimingProfile timingProfile)

      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.

      Specified by:
      getManeuverNotificationTimingOptions in interface NavigatorInterface
      Parameters:
      transportMode -

      The transport mode of the timing options.

      timingProfile -

      The timing profile of the timing options.

      Returns:

      The timing options with default values.

    • setManeuverNotificationTimingOptions

      public boolean setManeuverNotificationTimingOptions(@NonNull TransportMode transportMode, @NonNull TimingProfile timingProfile, @NonNull ManeuverNotificationTimingOptions options)

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

      Specified by:
      setManeuverNotificationTimingOptions in interface NavigatorInterface
      Parameters:
      transportMode -

      The transport mode of the timing options.

      timingProfile -

      The timing profile of the timing options.

      options -

      The timing options.

      Returns:

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

    • getWarningNotificationDistances

      @NonNull public WarningNotificationDistances getWarningNotificationDistances(@NonNull WarningType warningType)

      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.

      Specified by:
      getWarningNotificationDistances in interface NavigatorInterface
      Parameters:
      warningType -

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

      Returns:

      The notification distances for the given warning type.

    • setWarningNotificationDistances

      public boolean setWarningNotificationDistances(@NonNull WarningType warningType, @NonNull WarningNotificationDistances warningNotificationDistances)

      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.

      Specified by:
      setWarningNotificationDistances in interface NavigatorInterface
      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.

      Returns:

      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.

    • repeatLastManeuverNotification

      public void repeatLastManeuverNotification()

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

      Specified by:
      repeatLastManeuverNotification in interface NavigatorInterface
    • calculateRemainingDistanceInMeters

      @Nullable public Integer calculateRemainingDistanceInMeters(@NonNull GeoCoordinates coordinates)

      This method calculates the distance between the current position and given coordinates. The coordinates must be on the polyline.

      Specified by:
      calculateRemainingDistanceInMeters in interface NavigatorInterface
      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

      public void setCustomOption(@NonNull String key, @NonNull String value)

      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.

      Specified by:
      setCustomOption in interface NavigatorInterface
      Parameters:
      key -

      Option name

      value -

      New option value

    • onLocationUpdated

      public void onLocationUpdated(@NonNull Location location)

      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.

      Specified by:
      onLocationUpdated in interface LocationListener
      Parameters:
      location -

      Current location.

    • getRoute

      @Nullable public Route 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.

      Specified by:
      getRoute in interface NavigatorInterface
      Returns:

      The route to navigate.

    • setRoute

      public void setRoute(@Nullable Route value)

      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.

      Specified by:
      setRoute in interface NavigatorInterface
      Parameters:
      value -

      The route to navigate.

    • getTrackingTransportProfile

      @Nullable public TransportProfile 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 TransportProfile can be defined with a VehicleProfile. A vehicle profile can have several parameters such as VehicleType to set the source of information describing the vehicle. The default is a VehicleType.CAR profile.

      Currently used members of TransportProfile

      • VehicleType: 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.
      Specified by:
      getTrackingTransportProfile in interface NavigatorInterface
      Returns:

      Defines the transport profile for the Navigator, when no route is present.

    • setTrackingTransportProfile

      public void setTrackingTransportProfile(@Nullable TransportProfile value)

      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 TransportProfile can be defined with a VehicleProfile. A vehicle profile can have several parameters such as VehicleType to set the source of information describing the vehicle. The default is a VehicleType.CAR profile.

      Currently used members of TransportProfile

      • VehicleType: 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.
      Specified by:
      setTrackingTransportProfile in interface NavigatorInterface
      Parameters:
      value -

      Defines the transport profile for the Navigator, when no route is present.

    • getNavigableLocationListener

      @Nullable public NavigableLocationListener getNavigableLocationListener()

      Gets the listener that notifies current location updates.

      It returns null when no listener is set by an user.

      Specified by:
      getNavigableLocationListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about the current location.

    • setNavigableLocationListener

      public void setNavigableLocationListener(@Nullable NavigableLocationListener value)

      Sets the listener that notifies current location updates.

      It returns null when no listener is set by an user.

      Specified by:
      setNavigableLocationListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about the current location.

    • getRouteProgressListener

      @Nullable public RouteProgressListener getRouteProgressListener()

      Gets the listener that notifies when a route progress change occurs.

      Route progress notifications only occurs if the route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getRouteProgressListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about navigation route progress.

    • setRouteProgressListener

      public void setRouteProgressListener(@Nullable RouteProgressListener value)

      Sets the listener that notifies when a route progress change occurs.

      Route progress notifications only occurs if the route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setRouteProgressListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about navigation route progress.

    • getRouteDeviationListener

      @Nullable public RouteDeviationListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getRouteDeviationListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about deviations from the route if any occurs.

    • setRouteDeviationListener

      public void setRouteDeviationListener(@Nullable RouteDeviationListener value)

      Sets the listener that notifies when deviation from the route is observed.

      Route deviation notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setRouteDeviationListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about deviations from the route if any occurs.

    • getEventTextListener

      @Nullable public EventTextListener getEventTextListener()

      Gets the listener that notifies when a text notification is available.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Note: In order to receive the text notification emitted for the traffic merge warner, when TrafficMergeWarningOptions.enable_text_notification has been enabled, the sdk.navigation.EventTextListener must be enabled as well.

      Specified by:
      getEventTextListener in interface NavigatorInterface
      Returns:

      Object to receive text notifications when they are available.

    • setEventTextListener

      public void setEventTextListener(@Nullable EventTextListener value)

      Sets the listener that notifies when a text notification is available.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Note: In order to receive the text notification emitted for the traffic merge warner, when TrafficMergeWarningOptions.enable_text_notification has been enabled, the sdk.navigation.EventTextListener must be enabled as well.

      Specified by:
      setEventTextListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive text notifications when they are available.

    • getMilestoneStatusListener

      @Nullable public MilestoneStatusListener getMilestoneStatusListener()

      Gets the listener that notifies when a Milestone has been reached or missed.

      It informs on all waypoints (passed or missed) that are of type MilestoneType.STOPOVER but excludes the starting waypoint. Waypoints of type MilestoneType.PASSTHROUGH are excluded, by default, but can be included via NavigatorInterface.isPassthroughWaypointsHandlingEnabled(). Milestone status notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getMilestoneStatusListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about the arrival at each Milestone or missing it.

    • setMilestoneStatusListener

      public void setMilestoneStatusListener(@Nullable MilestoneStatusListener value)

      Sets the listener that notifies when a Milestone has been reached or missed.

      It informs on all waypoints (passed or missed) that are of type MilestoneType.STOPOVER but excludes the starting waypoint. Waypoints of type MilestoneType.PASSTHROUGH are excluded, by default, but can be included via NavigatorInterface.isPassthroughWaypointsHandlingEnabled(). Milestone status notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setMilestoneStatusListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about the arrival at each Milestone or missing it.

    • getDestinationReachedListener

      @Nullable public DestinationReachedListener getDestinationReachedListener()

      Gets the listener that notify when the destination has been reached.

      Destination reached notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getDestinationReachedListener in interface NavigatorInterface
      Returns:

      Object to receive the notification about the arrival at the destination.

    • setDestinationReachedListener

      public void setDestinationReachedListener(@Nullable DestinationReachedListener value)

      Sets the listener that notify when the destination has been reached.

      Destination reached notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setDestinationReachedListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive the notification about the arrival at the destination.

    • getSpeedWarningListener

      @Nullable public SpeedWarningListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getSpeedWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.

    • setSpeedWarningListener

      public void setSpeedWarningListener(@Nullable SpeedWarningListener value)

      Sets the listener to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setSpeedWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.

    • getManeuverViewLaneAssistanceListener

      @Nullable public ManeuverViewLaneAssistanceListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getManeuverViewLaneAssistanceListener in interface NavigatorInterface
      Returns:

      Object to receive maneuver view lane assistance notifications.

    • setManeuverViewLaneAssistanceListener

      public void setManeuverViewLaneAssistanceListener(@Nullable ManeuverViewLaneAssistanceListener value)

      Sets the listener to receive maneuver view lane assistance notifications.

      Maneuver view lane assistance notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setManeuverViewLaneAssistanceListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive maneuver view lane assistance notifications.

    • getCurrentSituationLaneAssistanceViewListener

      @Nullable public CurrentSituationLaneAssistanceViewListener getCurrentSituationLaneAssistanceViewListener()

      Gets the listener to receive current situation lane assistance view notifications.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getCurrentSituationLaneAssistanceViewListener in interface NavigatorInterface
      Returns:

      Object to receive current situation lane assistance view notifications.

    • setCurrentSituationLaneAssistanceViewListener

      public void setCurrentSituationLaneAssistanceViewListener(@Nullable CurrentSituationLaneAssistanceViewListener value)

      Sets the listener to receive current situation lane assistance view notifications.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setCurrentSituationLaneAssistanceViewListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive current situation lane assistance view notifications.

    • getEnvironmentalZoneWarningListener

      @Nullable public EnvironmentalZoneWarningListener getEnvironmentalZoneWarningListener()

      Gets the listener to receive current environmental zones notifications.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getEnvironmentalZoneWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notification on approaching environmental zones.

    • setEnvironmentalZoneWarningListener

      public void setEnvironmentalZoneWarningListener(@Nullable EnvironmentalZoneWarningListener value)

      Sets the listener to receive current environmental zones notifications.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setEnvironmentalZoneWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notification on approaching environmental zones.

    • getJunctionViewLaneAssistanceListener

      @Nullable public JunctionViewLaneAssistanceListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getJunctionViewLaneAssistanceListener in interface NavigatorInterface
      Returns:

      Object to receive junction view lane assistance notifications.

    • setJunctionViewLaneAssistanceListener

      public void setJunctionViewLaneAssistanceListener(@Nullable JunctionViewLaneAssistanceListener value)

      Sets the listener to receive junction view lane assistance notifications.

      Junction view lane assistance notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setJunctionViewLaneAssistanceListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive junction view lane assistance notifications.

    • getSafetyCameraWarningListener

      @Nullable public SafetyCameraWarningListener 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. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getSafetyCameraWarningListener in interface NavigatorInterface
      Returns:

      Object to receive safety camera warner notifications.

    • setSafetyCameraWarningListener

      public void setSafetyCameraWarningListener(@Nullable SafetyCameraWarningListener value)

      Sets the listener to receive safety camera warning notifications.

      If a listener is present, notifications about safety speed cameras will be also sent via SafetyCameraWarningListener. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setSafetyCameraWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive safety camera warner notifications.

    • getSafetyCameraWarningOptions

      @NonNull public SafetyCameraWarningOptions getSafetyCameraWarningOptions()

      Gets safety camera warning options to be passed to SafetyCameraWarningListener.

      These options allow the enabling or disabling the text notification for the warner.

      Specified by:
      getSafetyCameraWarningOptions in interface NavigatorInterface
      Returns:

      Safety camera warning options to be passed to SafetyCameraWarningListener.

    • setSafetyCameraWarningOptions

      public void setSafetyCameraWarningOptions(@NonNull SafetyCameraWarningOptions value)

      Sets safety camera warning options to be passed to SafetyCameraWarningListener.

      These options allow the enabling or disabling the text notification for the warner.

      Specified by:
      setSafetyCameraWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Safety camera warning options to be passed to SafetyCameraWarningListener.

    • getDangerZoneWarningListener

      @Nullable public DangerZoneWarningListener getDangerZoneWarningListener()

      Gets the listener to receive current danger zones notifications.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getDangerZoneWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notification on approaching danger zones.

    • setDangerZoneWarningListener

      public void setDangerZoneWarningListener(@Nullable DangerZoneWarningListener value)

      Sets the listener to receive current danger zones notifications.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setDangerZoneWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notification on approaching danger zones.

    • getTruckRestrictionsWarningListener

      @Nullable public TruckRestrictionsWarningListener getTruckRestrictionsWarningListener()

      Gets the listener to receive notifications about truck restrictions on the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getTruckRestrictionsWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about truck restrictions on the current road.

    • setTruckRestrictionsWarningListener

      public void setTruckRestrictionsWarningListener(@Nullable TruckRestrictionsWarningListener value)

      Sets the listener to receive notifications about truck restrictions on the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setTruckRestrictionsWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about truck restrictions on the current road.

    • getTruckRestrictionsWarningOptions

      @NonNull public TruckRestrictionsWarningOptions getTruckRestrictionsWarningOptions()

      Gets truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningListener.

      Specified by:
      getTruckRestrictionsWarningOptions in interface NavigatorInterface
      Returns:

      Truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningListener.

    • setTruckRestrictionsWarningOptions

      public void setTruckRestrictionsWarningOptions(@NonNull TruckRestrictionsWarningOptions value)

      Sets truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningListener.

      Specified by:
      setTruckRestrictionsWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningListener.

    • getPostActionListener

      @Nullable public PostActionListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getPostActionListener in interface NavigatorInterface
      Returns:

      Object to receive post action notifications, such as a charge action at a charging station.

    • setPostActionListener

      public void setPostActionListener(@Nullable PostActionListener value)

      Sets 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setPostActionListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive post action notifications, such as a charge action at a charging station.

    • getSpeedLimitListener

      @Nullable public SpeedLimitListener getSpeedLimitListener()

      Gets the listener to receive notifications about the speed limit of the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getSpeedLimitListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about the speed limit of the current road.

    • setSpeedLimitListener

      public void setSpeedLimitListener(@Nullable SpeedLimitListener value)

      Sets the listener to receive notifications about the speed limit of the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setSpeedLimitListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about the speed limit of the current road.

    • getRoadTextsListener

      @Nullable public RoadTextsListener getRoadTextsListener()

      Gets the listener to receive notifications about the textual attributes of the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getRoadTextsListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about the textual attributes of the current road.

    • setRoadTextsListener

      public void setRoadTextsListener(@Nullable RoadTextsListener value)

      Sets the listener to receive notifications about the textual attributes of the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setRoadTextsListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about the textual attributes of the current road.

    • getRoadAttributesListener

      @Nullable public RoadAttributesListener getRoadAttributesListener()

      Gets the listener to receive notifications about attributes of the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getRoadAttributesListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about attributes of the current road.

    • setRoadAttributesListener

      public void setRoadAttributesListener(@Nullable RoadAttributesListener value)

      Sets the listener to receive notifications about attributes of the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setRoadAttributesListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about attributes of the current road.

    • getRoadSignWarningListener

      @Nullable public RoadSignWarningListener getRoadSignWarningListener()

      Gets the listener to receive notifications about road signs on the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getRoadSignWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about road signs on the current road.

    • setRoadSignWarningListener

      public void setRoadSignWarningListener(@Nullable RoadSignWarningListener value)

      Sets the listener to receive notifications about road signs on the current road. Note: This RoadSignWarningListener will provide school zone warnings only in case the speed limit inside the school zone is different than the default speed limit applicable for cars outside the school zone. For warnings about school zones regardless of their speed limits, the NavigatorInterface.road_sign_warning_listener should be used and the RoadSignWarning.type should be checked for value RoadSignType.SCHOOL_ZONE. The school zone warner is a zone warner, which means that for a school zone there will always be 3 warnings emitted, with the SchoolZoneWarning.distance_type set to DistanceType.AHEAD, DistanceType.REACHED

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setRoadSignWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about road signs on the current road.

    • getRoadSignWarningOptions

      @NonNull public RoadSignWarningOptions getRoadSignWarningOptions()

      Gets road sign warning options that allow to filter road signs to be passed to RoadSignWarningListener.

      Specified by:
      getRoadSignWarningOptions in interface NavigatorInterface
      Returns:

      Road sign warning options that allow to filter road sings to be passed to RoadSignWarningListener.

    • setRoadSignWarningOptions

      public void setRoadSignWarningOptions(@NonNull RoadSignWarningOptions value)

      Sets road sign warning options that allow to filter road signs to be passed to RoadSignWarningListener.

      Specified by:
      setRoadSignWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Road sign warning options that allow to filter road sings to be passed to RoadSignWarningListener.

    • getSchoolZoneWarningListener

      @Nullable public SchoolZoneWarningListener getSchoolZoneWarningListener()

      Gets the listener to receive notifications about school zones on the current road.

      Setting null value to the listener will unset the listener. school zones on the current road. It returns null when no listener is set by an user.

      Specified by:
      getSchoolZoneWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about school zones on the current road.

    • setSchoolZoneWarningListener

      public void setSchoolZoneWarningListener(@Nullable SchoolZoneWarningListener value)

      Sets the listener to receive notifications about school zones on the current road.

      Setting null value to the listener will unset the listener. school zones on the current road. It returns null when no listener is set by an user.

      Specified by:
      setSchoolZoneWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about school zones on the current road.

    • getSchoolZoneWarningOptions

      @NonNull public SchoolZoneWarningOptions 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.

      Specified by:
      getSchoolZoneWarningOptions in interface NavigatorInterface
      Returns:

      School zone warning options

    • setSchoolZoneWarningOptions

      public void setSchoolZoneWarningOptions(@NonNull SchoolZoneWarningOptions value)

      Sets 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.

      Specified by:
      setSchoolZoneWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      School zone warning options

    • getRealisticViewWarningListener

      @Nullable public RealisticViewWarningListener getRealisticViewWarningListener()

      Gets the listener to receive notifications about junction views on the current road.

      Setting null value to the listener will unset the listener. This feature requires a map version greater or equal to 67 in order to function properly. It returns null when no listener is set by an user.

      Specified by:
      getRealisticViewWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about junction views on the current road.

    • setRealisticViewWarningListener

      public void setRealisticViewWarningListener(@Nullable RealisticViewWarningListener value)

      Sets the listener to receive notifications about junction views on the current road.

      Setting null value to the listener will unset the listener. This feature requires a map version greater or equal to 67 in order to function properly. It returns null when no listener is set by an user.

      Specified by:
      setRealisticViewWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about junction views on the current road.

    • getRealisticViewWarningOptions

      @NonNull public RealisticViewWarningOptions 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.
      Specified by:
      getRealisticViewWarningOptions in interface NavigatorInterface
      Returns:

      Realistic view warning options.

    • setRealisticViewWarningOptions

      public void setRealisticViewWarningOptions(@NonNull RealisticViewWarningOptions value)

      Sets 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.
      Specified by:
      setRealisticViewWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Realistic view warning options.

    • getBorderCrossingWarningListener

      @Nullable public BorderCrossingWarningListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getBorderCrossingWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about border crossings on the current road.

    • setBorderCrossingWarningListener

      public void setBorderCrossingWarningListener(@Nullable BorderCrossingWarningListener value)

      Sets the listener to receive notifications about border crossings on the current road.

      Border crossing notifications are given only if a route is present. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setBorderCrossingWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about border crossings on the current road.

    • getBorderCrossingWarningOptions

      @NonNull public BorderCrossingWarningOptions 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.

      Specified by:
      getBorderCrossingWarningOptions in interface NavigatorInterface
      Returns:

      Border crossing warning options to be passed to BorderCrossingWarningListener. These options

    • setBorderCrossingWarningOptions

      public void setBorderCrossingWarningOptions(@NonNull BorderCrossingWarningOptions value)

      Sets border crossing warning options to be passed to BorderCrossingWarningListener.

      allow the filtering of the border crossing warnings received and set the notification distances.

      Specified by:
      setBorderCrossingWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Border crossing warning options to be passed to BorderCrossingWarningListener. These options

    • getTollStopWarningListener

      @Nullable public TollStopWarningListener getTollStopWarningListener()

      Gets the listener to receive notifications about the the upcoming toll stop.

      Setting null value 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.

      Specified by:
      getTollStopWarningListener in interface NavigatorInterface
      Returns:

      Object to receive information on the upcoming toll stop.

    • setTollStopWarningListener

      public void setTollStopWarningListener(@Nullable TollStopWarningListener value)

      Sets the listener to receive notifications about the upcoming toll stop.

      Setting null value 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.

      Specified by:
      setTollStopWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive information on the upcoming toll stop.

    • getRailwayCrossingWarningListener

      @Nullable public RailwayCrossingWarningListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getRailwayCrossingWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about railway crossings on the current road.

    • setRailwayCrossingWarningListener

      public void setRailwayCrossingWarningListener(@Nullable RailwayCrossingWarningListener value)

      Sets the listener to receive notifications about railway crossings on the current road.

      Railway crossing notifications are given regardless if a route is set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setRailwayCrossingWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about railway crossings on the current road.

    • getLowSpeedZoneWarningListener

      @Nullable public LowSpeedZoneWarningListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getLowSpeedZoneWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about low speed zones on the current road.

    • setLowSpeedZoneWarningListener

      public void setLowSpeedZoneWarningListener(@Nullable LowSpeedZoneWarningListener value)

      Sets 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setLowSpeedZoneWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about low speed zones on the current road.

    • getTrafficMergeWarningListener

      @Nullable public TrafficMergeWarningListener getTrafficMergeWarningListener()

      Gets the listener to receive notifications about merging traffic to the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getTrafficMergeWarningListener in interface NavigatorInterface
      Returns:

      Object to receive notifications about merging traffic to the current road.

    • setTrafficMergeWarningListener

      public void setTrafficMergeWarningListener(@Nullable TrafficMergeWarningListener value)

      Sets the listener to receive notifications about merging traffic to the current road.

      Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setTrafficMergeWarningListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive notifications about merging traffic to the current road.

    • getTrafficMergeWarningOptions

      @NonNull public TrafficMergeWarningOptions getTrafficMergeWarningOptions()

      Gets merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningListener.

      Specified by:
      getTrafficMergeWarningOptions in interface NavigatorInterface
      Returns:

      Merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningListener.

    • setTrafficMergeWarningOptions

      public void setTrafficMergeWarningOptions(@NonNull TrafficMergeWarningOptions value)

      Sets merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningListener.

      Specified by:
      setTrafficMergeWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningListener.

    • getOffRoadDestinationReachedListener

      @Nullable public OffRoadDestinationReachedListener 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getOffRoadDestinationReachedListener in interface NavigatorInterface
      Returns:

      Object to receive the notification about the arrival at the off-road destination.

    • setOffRoadDestinationReachedListener

      public void setOffRoadDestinationReachedListener(@Nullable OffRoadDestinationReachedListener value)

      Sets 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 null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setOffRoadDestinationReachedListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive the notification about the arrival at the off-road destination.

    • getOffRoadProgressListener

      @Nullable public OffRoadProgressListener getOffRoadProgressListener()

      Gets the listener that notifies about off-road progress.

      Off-road progress notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      getOffRoadProgressListener in interface NavigatorInterface
      Returns:

      Object to receive the notification about the off-road progress.

    • setOffRoadProgressListener

      public void setOffRoadProgressListener(@Nullable OffRoadProgressListener value)

      Sets the listener that notifies about off-road progress.

      Off-road progress notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user.

      Specified by:
      setOffRoadProgressListener in interface NavigatorInterface
      Parameters:
      value -

      Object to receive the notification about the off-road progress.

    • getManeuverNotificationOptions

      @NonNull public ManeuverNotificationOptions getManeuverNotificationOptions()

      Gets the maneuver notification options.

      Notifications are only available if a route is present.

      Specified by:
      getManeuverNotificationOptions in interface NavigatorInterface
      Returns:

      Options used for maneuver notifications.

    • setManeuverNotificationOptions

      public void setManeuverNotificationOptions(@NonNull ManeuverNotificationOptions value)

      Sets the maneuver notification options.

      Notifications are only available if a route is present.

      Specified by:
      setManeuverNotificationOptions in interface NavigatorInterface
      Parameters:
      value -

      Options used for maneuver notifications.

    • getEventTextOptions

      @NonNull public EventTextOptions getEventTextOptions()

      Gets the text notification options.

      Notifications are only available if a route is present.

      Specified by:
      getEventTextOptions in interface NavigatorInterface
      Returns:

      Options used for text notifications.

    • setEventTextOptions

      public void setEventTextOptions(@NonNull EventTextOptions value)

      Sets the text notification options.

      Notifications are only available if a route is present.

      Specified by:
      setEventTextOptions in interface NavigatorInterface
      Parameters:
      value -

      Options used for text notifications.

    • getSpeedWarningOptions

      @NonNull public SpeedWarningOptions getSpeedWarningOptions()

      Gets the speed warning options.

      Specified by:
      getSpeedWarningOptions in interface NavigatorInterface
      Returns:

      Options used for the speed warning feature.

    • setSpeedWarningOptions

      public void setSpeedWarningOptions(@NonNull SpeedWarningOptions value)

      Sets the speed warning options.

      Specified by:
      setSpeedWarningOptions in interface NavigatorInterface
      Parameters:
      value -

      Options used for the speed warning feature.

    • isEnableTunnelExtrapolation

      public boolean isEnableTunnelExtrapolation()

      Return true if tunnel extrapolation is enabled otherwise false.

      By default the tunnel extrapolation is enabled.

      Specified by:
      isEnableTunnelExtrapolation in interface NavigatorInterface
      Returns:

      Defines whether to enable or disable tunnel extrapolation.

    • setEnableTunnelExtrapolation

      public void setEnableTunnelExtrapolation(boolean value)

      Set to true to enable tunnel extrapolation, set to false to disable tunnel extrapolation.

      By default the tunnel extrapolation is enabled.

      Specified by:
      setEnableTunnelExtrapolation in interface NavigatorInterface
      Parameters:
      value -

      Defines whether to enable or disable tunnel extrapolation.

    • isPassthroughWaypointsHandlingEnabled

      public boolean isPassthroughWaypointsHandlingEnabled()

      Return true if handling of passthrough waypoints is enabled, otherwise - false.

      By default the handling of passthrough waypoints is disabled.

      Specified by:
      isPassthroughWaypointsHandlingEnabled in interface NavigatorInterface
      Returns:

      Defines whether to enable or disable handling of passthrough waypoints.

    • setPassthroughWaypointsHandlingEnabled

      public void setPassthroughWaypointsHandlingEnabled(boolean value)

      Set to true enables handling of passthrough waypoints, set to false disables handling of passthrough waypoints.

      By default the handling of passthrough waypoints is disabled.

      Specified by:
      setPassthroughWaypointsHandlingEnabled in interface NavigatorInterface
      Parameters:
      value -

      Defines whether to enable or disable handling of passthrough waypoints.

    • getTrafficOnRoute

      @Nullable public TrafficOnRoute getTrafficOnRoute()

      Gets the traffic information for the current route.

      This impacts RouteProgress updates as the duration of the SectionProgress might change. However, the remaining distance and the route geometry will remain unchanged.

      Specified by:
      getTrafficOnRoute in interface NavigatorInterface
      Returns:

      Traffic information for the current route.

    • setTrafficOnRoute

      public void setTrafficOnRoute(@Nullable TrafficOnRoute value)

      Sets the traffic information for the current route.

      This impacts RouteProgress updates as the duration of the SectionProgress might change. However, the remaining distance and the route geometry will remain unchanged.

      Specified by:
      setTrafficOnRoute in interface NavigatorInterface
      Parameters:
      value -

      Traffic information for the current route.