Package globus.glroute
Class GLRouteBuilder
java.lang.Object
globus.glmap.GLNativeObject
globus.glroute.GLRouteBuilder
GLRouteBuilder
used construct custom routes.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addManeuver
(int type, MapPoint[] points, float[] heights) Adds a maneuver to the route.build()
Finalizes the route construction and validates it.void
setLanguage
(String language) Sets the language for maneuver instructions.void
setManeuverInstruction
(int type, String instruction) Sets a short instruction for the previously added maneuver.void
setManeuverTime
(double maneuverTime) Sets the time for the maneuver.Methods inherited from class globus.glmap.GLNativeObject
dispose
-
Constructor Details
-
GLRouteBuilder
public GLRouteBuilder()Default constructor
-
-
Method Details
-
setLanguage
Sets the language for maneuver instructions.- Parameters:
language
- The language code (e.g., "en", "fr") for the maneuver instructions.
-
addManeuver
Adds a maneuver to the route.- Parameters:
type
- The type of the maneuver, defined byGLRouteManeuver.Type
.points
- An array ofMapPoint
objects representing the points of the maneuver.heights
- An optional array of heights corresponding to the points, ornull
if not applicable.
-
setManeuverTime
public void setManeuverTime(double maneuverTime) Sets the time for the maneuver.- Parameters:
maneuverTime
- The time for the maneuver in seconds.
-
setManeuverInstruction
Sets a short instruction for the previously added maneuver.- Parameters:
type
- The type of instruction to set, defined byGLRouteManeuver.InstructionType
.instruction
- The text of the instruction.
-
build
Finalizes the route construction and validates it.- Returns:
- A
GLRoute
object representing the built route, ornull
if the route is invalid.
-