Page Summary
-
CustomRoutesOptions.Builderhelps construct instances ofCustomRoutesOptionsfor customizing navigation routes. -
It allows specifying a route token obtained from the Routes Preferred API using
setRouteToken(). -
setTravelMode()is used to define the transportation mode, ensuring consistency with the Routes Preferred setup. -
build()creates aCustomRoutesOptionsinstance based on the provided settings, throwing an exception if the route token is invalid.
A Builder class to construct instances of CustomRoutesOptions.
Public Constructor Summary
|
Builder()
|
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.