GLRouteBuilder
Objective-C
@interface GLRouteBuilder : NSObject
Swift
class GLRouteBuilder : NSObject
GLRouteBuilder
is a class that constructs custom routes with user-defined maneuvers and target points.
-
Default initializer.
Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
Return Value
A new GLRouteBuilder instance.
-
Sets the language of the maneuvers.
Declaration
Objective-C
- (void)setLanguage:(nonnull NSString *)language;
Swift
func setLanguage(_ language: String)
Parameters
language
The language of the maneuvers, specified as a 2-letter ISO-639-1 language code.
-
Adds a target point to the route.
Declaration
Objective-C
- (void)addTargetPoint:(GLRoutePoint)point;
Swift
func addTargetPoint(_ point: GLRoutePoint)
Parameters
point
The target point to add to the route.
-
Adds a new maneuver to the route.
Declaration
Objective-C
- (void)addManeuver:(GLManeuverType)type points:(nonnull const GLMapPoint *)points heights:(const float *_Nullable)heights numberOfPoints:(uint32_t)numberOfPoints;
Swift
func add(_ type: GLManeuverType, points: UnsafePointer<GLMapPoint>, heights: UnsafePointer<Float>?, numberOfPoints: UInt32)
Parameters
type
The type of the maneuver.
points
An array of points that represents the maneuver’s geometry.
heights
An array of heights at each point in the points array, or
NULL
if height data is not available.numberOfPoints
The number of points (and heights, if applicable) in the arrays.
-
Adds the maneuvers from a line to the route.
Declaration
Objective-C
- (void)addLine:(nonnull GLMapVectorLine *)line;
Swift
func add(_ line: GLMapVectorLine)
Parameters
line
A GLMapVectorLine object representing a line with maneuvers.
-
Sets the time for the previously added maneuver.
Declaration
Objective-C
- (void)setManeuverTime:(double)maneuverTime;
Swift
func setManeuverTime(_ maneuverTime: Double)
Parameters
maneuverTime
The time (in seconds) to set for the previously added maneuver.
-
Sets the short instruction for the previously added maneuver.
Declaration
Objective-C
- (void)setManeuverShortInstruction:(nonnull NSString *)instruction;
Swift
func setManeuverShortInstruction(_ instruction: String)
Parameters
instruction
The short instruction text for the previously added maneuver.
-
Sets the transition instruction for the previously added maneuver.
Declaration
Objective-C
- (void)setManeuverTransitionInstruction:(nonnull NSString *)instruction;
Swift
func setManeuverTransitionInstruction(_ instruction: String)
Parameters
instruction
The transition instruction text for the previously added maneuver.
-
Sets the verbal pre-transition instruction for the previously added maneuver.
Declaration
Objective-C
- (void)setManeuverVerbalPreTransitionInstruction: (nonnull NSString *)instruction;
Swift
func setManeuverVerbalPreTransitionInstruction(_ instruction: String)
Parameters
instruction
The verbal pre-transition instruction text for the previously added maneuver.
-
Sets the verbal transition instruction for the previously added maneuver.
Declaration
Objective-C
- (void)setManeuverVerbalTransitionInstruction:(nonnull NSString *)instruction;
Swift
func setManeuverVerbalTransitionInstruction(_ instruction: String)
Parameters
instruction
The verbal transition instruction text for the previously added maneuver.
-
Sets the verbal post-transition instruction for the previously added maneuver.
Declaration
Objective-C
- (void)setManeuverVerbalPostTransitionInstruction: (nonnull NSString *)instruction;
Swift
func setManeuverVerbalPostTransitionInstruction(_ instruction: String)
Parameters
instruction
The verbal post-transition instruction text for the previously added maneuver.