CustomRoutesOptions.Builder

public static abstract class CustomRoutesOptions.Builder extends Object

A Builder class to construct instances of CustomRoutesOptions.

Public Constructor Summary

Public Method Summary

final CustomRoutesOptions
build()
Creates and returns a new instance of CustomRoutesOptions using the attributes from the Builder object.
abstract CustomRoutesOptions.Builder
setRouteToken(String routeToken)
Specifies the desired route token.
abstract CustomRoutesOptions.Builder
setTravelMode(int travelMode)
Specifies the type of transportation used to determine the navigation directions.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public final CustomRoutesOptions build ()

Creates and returns a new instance of CustomRoutesOptions using the attributes from the Builder object.

Throws
IllegalStateException if the route token in the builder is malformed.

public abstract CustomRoutesOptions.Builder setRouteToken (String routeToken)

Specifies the desired route token.

Parameters
routeToken a route token string returned by RoutesPreferred API.
Returns
  • the object upon which the method was called, with the updated route token.

public abstract CustomRoutesOptions.Builder setTravelMode (int travelMode)

Specifies the type of transportation used to determine the navigation directions.

It must match the travel mode passed to Routes Preferred to generate the route token. If there is a mismatch, then the travel mode passed to NavSDK will override the mode passed to Routes Preferred.

Parameters
travelMode
Returns
  • the object upon which the method was called, with the updated travel mode.