Defines the options used by the Navigator
for calculating a route to a destination.
Nested Class Summary
@interface | RoutingOptions.RoutingStrategy | The routing strategy specifies how routes are ranked, which affects the route that is chosen initially, and during re-routing. | |
@interface | RoutingOptions.TravelMode | Specifies the type of transportation used to tailor the directions. |
Public Constructor Summary
Public Method Summary
RoutingOptions |
alternateRoutesStrategy(AlternateRoutesStrategy alternateRoutesOption)
Configures the number of alternate routes to be displayed during navigation.
|
RoutingOptions |
avoidHighways(boolean avoidHighways)
Configures whether to avoid highways and motorways when generating a route to a destination.
|
RoutingOptions |
avoidTolls(boolean avoidTolls)
Configures whether to avoid toll roads when generating a route to a destination.
|
AlternateRoutesStrategy |
getAlternateRoutesStrategy()
Returns the preferred display strategy for the number of alternate routes that are shown during
navigation.
|
boolean |
getAvoidHighways()
Returns a boolean indicating whether highways and motorways are avoided.
|
boolean |
getAvoidTolls()
Returns a boolean indicating whether toll roads are avoided.
|
long |
getLocationTimeoutMs()
Returns the maximum time in milliseconds to wait for a location fix before
setDestinations(List fails. |
int | |
int |
getTravelMode()
Returns the type of directions to provide to the user.
|
RoutingOptions |
locationTimeoutMs(long locationTimeoutMs)
Configures the maximum time to wait for a location fix before
setDestinations(List
fails with LOCATION_UNKNOWN . |
RoutingOptions |
routingStrategy(int routingStrategy)
Specifies the routing strategy used in navigation and in re-routing.
|
RoutingOptions |
travelMode(int travelMode)
Specifies the type of transportation used to determine the navigation directions.
|
Inherited Method Summary
Public Constructors
public RoutingOptions ()
Public Methods
public RoutingOptions alternateRoutesStrategy (AlternateRoutesStrategy alternateRoutesOption)
Configures the number of alternate routes to be displayed during navigation. By default, all available alternate routes are shown.
Parameters
alternateRoutesOption | The preferred display strategy for the number of alternate routes that are shown during navigation. |
---|
Returns
- the object for which the method was called, with the updated alternate route setting.
public RoutingOptions avoidHighways (boolean avoidHighways)
Configures whether to avoid highways and motorways when generating a route to a destination.
Parameters
avoidHighways | If true , highways and motorways are avoided. |
---|
Returns
- the object for which the method was called with the updated highway avoidance setting
public RoutingOptions avoidTolls (boolean avoidTolls)
Configures whether to avoid toll roads when generating a route to a destination.
Parameters
avoidTolls | If true , toll roads are avoided. |
---|
Returns
- the object for which the method was called with the updated toll avoidance setting
public AlternateRoutesStrategy getAlternateRoutesStrategy ()
Returns the preferred display strategy for the number of alternate routes that are shown during navigation.
public boolean getAvoidHighways ()
Returns a boolean indicating whether highways and motorways are avoided.
Returns
true
if highways and motorways are avoided
public boolean getAvoidTolls ()
Returns a boolean indicating whether toll roads are avoided.
Returns
true
if toll roads are avoided
public long getLocationTimeoutMs ()
Returns the maximum time in milliseconds to wait for a location fix before setDestinations(List
fails. If the value is zero, there is no limit.
Returns
- the maximum time to wait for a location fix
public int getRoutingStrategy ()
public int getTravelMode ()
Returns the type of directions to provide to the user.
public RoutingOptions locationTimeoutMs (long locationTimeoutMs)
Configures the maximum time to wait for a location fix before setDestinations(List
fails with LOCATION_UNKNOWN
. A value of zero, the default, will
cause it to wait forever.
Parameters
locationTimeoutMs | The maximum time, in milliseconds, to wait for a location. |
---|
Returns
- the object for which the method was called, with the updated location timeout setting
public RoutingOptions routingStrategy (int routingStrategy)
Specifies the routing strategy used in navigation and in re-routing.
Parameters
routingStrategy |
---|
public RoutingOptions travelMode (int travelMode)
Specifies the type of transportation used to determine the navigation directions.
Parameters
travelMode |
---|
Returns
- the object for which the method was called with the updated travel mode.