Package globus.glroute
Class GLRouteBuilder
java.lang.Object
globus.glmap.GLNativeObject
globus.glroute.GLRouteBuilder
GLRouteBuilder used construct custom routes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddManeuver(int type, MapPoint[] points, float[] heights) Adds a maneuver to the route.build()Finalizes the route construction and validates it.voidsetLanguage(String language) Sets the language for maneuver instructions.voidsetManeuverInstruction(int type, String instruction) Sets a short instruction for the previously added maneuver.voidsetManeuverTime(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 ofMapPointobjects representing the points of the maneuver.heights- An optional array of heights corresponding to the points, ornullif 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
GLRouteobject representing the built route, ornullif the route is invalid.
-