Class Maneuver

java.lang.Object
com.here.NativeBase
com.here.sdk.routing.Maneuver

public final class Maneuver extends NativeBase

This class provides all the information for a maneuver. The directional information (e.g. road names, road numbers and signpost direction) is stored in getRoadTexts() and getNextRoadTexts() attributes. As for the motorway exit information, it can be obtained from getExitSignTexts() attribute.

  • Method Details

    • getAction

      @NonNull public ManeuverAction getAction()

      Gets the maneuver action.

      Returns:

      Indicates the maneuver action.

    • getCoordinates

      @NonNull public GeoCoordinates getCoordinates()

      Gets the geographic coordinates where the maneuver is located.

      Returns:

      Geographic coordinates where the maneuver is located.

    • getOffset

      public int getOffset()

      Gets the index over Section.getGeometry() where the maneuver is located.

      Returns:

      Index over Section.getGeometry() where the maneuver is located.

    • getCountryCode

      @Nullable public String getCountryCode()

      Gets the country code of the maneuver position. The value is null when no data is available.

      Returns:

      The country code of the maneuver position. The value is null when no data is available.

    • getExitSignTexts

      @NonNull public LocalizedTexts getExitSignTexts()

      Gets the textual attributes of the exit sign. These might contain exit number(s) and/or name(s).

      These attributes are only available for the Navigate license. Otherwise, the attributes are always empty.

      Returns:

      The textual attributes of the exit sign. These might contain exit number(s) and/or name(s).

    • getLengthInMeters

      public int getLengthInMeters()

      Gets the length of the maneuver in meters.

      Returns:

      The length of the maneuver in meters.

    • getRoadTexts

      @NonNull public RoadTexts getRoadTexts()

      Gets the textual attributes of the current road containing road names, road numbers and signpost direction (towards) information.

      Note: These attributes are only available for the Navigate license. Otherwise, the attributes are always empty.

      Returns:

      The textual attributes of the current road containing road names, road numbers and signpost direction (towards) information.

    • getNextRoadTexts

      @NonNull public RoadTexts getNextRoadTexts()

      Gets the textual attributes of the next road containing the corresponding road name(s) and road number(s) after the maneuver point.

      These attributes are only available for the Navigate license. Otherwise, the attributes are always empty.

      Returns:

      The textual attributes of the next road containing the corresponding road name(s) and road number(s) after the maneuver point.

    • getSignpost

      @Nullable public Signpost getSignpost()

      Gets Signpost object.

      Returns:

      Gets the Signpost object.

    • getIntersectionNames

      @NonNull public LocalizedTexts getIntersectionNames()

      Gets the textual attributes of the intersection.

      These attributes are only available for the Navigate license. Otherwise, the attributes are always empty. Note: Routes calculated with OfflineRoutingEngine are not supported.

      Returns:

      The textual attributes of the intersection.

    • getText

      @NonNull public String getText()

      Gets the maneuver instruction. The text is formatted and localized as specified via RouteTextOptions.

      Note for users of the Navigate license: This text is meant to be displayed in a preview context, whereas real-time EventTextListener texts are meant to be used for spoken voice announcements during a trip.

      Returns:

      The maneuver instruction. The text is formatted and localized as specified via RouteTextOptions.

    • getSectionIndex

      public int getSectionIndex()

      Gets the index over Route.getSections() indicating the section to which the maneuver belongs to.

      Returns:

      Index over Route.getSections() indicating the section to which the maneuver belongs to.

    • getSpanIndex

      public int getSpanIndex()

      Gets the index over Section.getSpans() indicating the first span after the maneuver point.

      Note: The span index for the last maneuvers (those maneuvers with maneuver action set to ManeuverAction.ARRIVE) cannot be used, since these maneuvers are placed after the last span of the route and the span index for them would be greater than the span list size.

      Returns:

      Index over Section.getSpans() indicating the first span after the maneuver point.

    • getDuration

      @NonNull public Duration getDuration()

      Gets the estimated time in seconds needed to perform the maneuver.

      Returns:

      The estimated time in seconds needed to perform the maneuver.

    • getTurnAngleInDegrees

      @Nullable public Double getTurnAngleInDegrees()

      Gets the angle of the turn component of the maneuver. The value is in degrees and from -180 to 180.

      The angle increases clockwise and small values are used for going straight, i.e. a positive number means there is a right turn and a negative number is a left turn. Some maneuvers like Depart, Arrive and Roundabout pass doesn't have a well defined angle, so the value is omitted. Note: These attributes are only available for the Navigate license.

      Returns:

      The angle of the turn component of the maneuver.

    • getRoundaboutAngleInDegrees

      @Nullable public Double getRoundaboutAngleInDegrees()

      The angle is estimated between the incoming and outgoing route parts before entering the actual roundabout.

      This is done to provide a better orientation for drivers. For better results, the incoming and outcoming route parts can be around 50 meters in length. In addition, these parts lie usually around 30 meters away from the actual roundabout. Therefore, the resulting arc does not necessarily represent the exact curved path a vehicle has to follow within a roundabout from the point of entry to the point of exit. Instead, it reflects the route path before and after the roundabout to highlight the directional change along the route. The angle can have a value from -360.0 to 360.0, and it is positive in right-hand side driving country, and negative in left-hand side countries. Note that the value is available for both the enter roundabout actions and the exit roundabout actions. Both maneuvers have the same value. When the incoming or outgoing route parts are curvy or when the roundabout itself is not representing a perfect circle, then the accuracy of the angle may be compromised. Note: These attributes are only available for the Navigate license.

      Returns:

      The angle is estimated between the incoming and outgoing route parts before entering the actual roundabout.