Package globus.glroute
Class GLRouteManeuver
java.lang.Object
globus.glmap.GLNativeObject
globus.glroute.GLRouteManeuver
Holds data for a route maneuver.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceRepresents the type of instruction for a maneuver.static @interfaceBitmask type that represents turn-lane directions.static @interfaceRepresents the maneuver type. -
Method Summary
Modifier and TypeMethodDescriptionintgetActiveTurnAtLane(int lane) Returns active turn directions for a lane that should be used to follow the route without requiring additional lane changes.End point of maneuverdoublegetEqualLength(GLRouteManeuver other) Calculates the common prefix length with another maneuver (based on identical geometry points).intgetIndex()Index of the maneuver inside the parent route.getInstruction(int type) Get instructionintNumber of lanesdoubleManeuver length in metersgetLine()Line with maneuver pointsintEnd index of maneuver in lineintStart index of maneuver in lineintThe spoke to exit roundabout after entering.Short instruction for UI.Start point of maneuverdoublegetTime()Estimated time along the maneuver in seconds.Text for use in UI.intgetTurnDirectionsAtLane(int lane) Returns possible turn directions for a specific lane.intgetType()Type of the maneuver.intgetValidTurnAtLane(int lane) Returns valid turn directions for a lane that can be used to follow the route initially.Text suitable for use as a verbal message immediately after the maneuver transition.Text suitable for use as a verbal message immediately prior to the maneuver transition.Text suitable for use as a verbal alert in a navigation application.Methods inherited from class globus.glmap.GLNativeObject
dispose
-
Method Details
-
getType
public int getType()Type of the maneuver. See Valhalla API reference for details.- Returns:
- Type of maneuver.
-
getIndex
public int getIndex()Index of the maneuver inside the parent route.- Returns:
- Zero-based maneuver index.
-
getLength
public double getLength()Maneuver length in meters- Returns:
- Length in meters.
-
getEqualLength
Calculates the common prefix length with another maneuver (based on identical geometry points).- Parameters:
other- Other maneuver- Returns:
- length of the common part in internal map units
-
getTime
public double getTime()Estimated time along the maneuver in seconds.- Returns:
- Time in seconds.
-
getInstruction
Get instruction- Parameters:
type- type of instruction- Returns:
- instruction
-
getShortInstruction
Short instruction for UI. For example "Exit 3A → AZ 202 Loop East"- Returns:
- short instruction
-
getTransitionInstruction
Text for use in UI. For example "Take exit 3A onto AZ 202 Loop East.".- Returns:
- transition instruction
-
getVerbalPreTransitionInstruction
Text suitable for use as a verbal message immediately prior to the maneuver transition. For example "Take exit 3A onto Arizona 2 o2 Loop East.".- Returns:
- message prior to the maneuver transition.
-
getVerbalTransitionInstruction
Text suitable for use as a verbal alert in a navigation application. The transition alert instruction will prepare the user for the forthcoming transition. For example: "Take exit 3A.".- Returns:
- instruction for the transition.
-
getVerbalPostTransitionInstruction
Text suitable for use as a verbal message immediately after the maneuver transition. For example "Continue for 1 kilometer.".- Returns:
- message after the maneuver transition.
-
getStartPoint
Start point of maneuver- Returns:
- start point of maneuver
-
getEndPoint
End point of maneuver- Returns:
- end point of maneuver
-
getRoundaboutExitCount
public int getRoundaboutExitCount()The spoke to exit roundabout after entering.- Returns:
- roundabout exit count or uint32_max if it's not set.
-
getLine
Line with maneuver points- Returns:
- line with maneuver points
-
getLineStartIndex
public int getLineStartIndex()Start index of maneuver in line- Returns:
- start index of maneuver in line
-
getLineEndIndex
public int getLineEndIndex()End index of maneuver in line- Returns:
- end index of maneuver in line
-
getLanesCount
public int getLanesCount()Number of lanes- Returns:
- number of lanes
-
getTurnDirectionsAtLane
public int getTurnDirectionsAtLane(int lane) Returns possible turn directions for a specific lane.- Parameters:
lane- The index of the lane (starting from 0).- Returns:
- A mask indicating all valid turn directions for the lane.
-
getValidTurnAtLane
public int getValidTurnAtLane(int lane) Returns valid turn directions for a lane that can be used to follow the route initially. Valid turns indicate that the lane is suitable for the maneuver but may require further lane changes later.- Parameters:
lane- The index of the lane (starting from 0).- Returns:
- A mask indicating valid turns for the lane.
-
getActiveTurnAtLane
public int getActiveTurnAtLane(int lane) Returns active turn directions for a lane that should be used to follow the route without requiring additional lane changes. Active turns indicate the optimal lane for continuing along the route as intended.- Parameters:
lane- The index of the lane (starting from 0).- Returns:
- A mask indicating active turns for the lane.
-