public static final class RouteManager.UpdatedRouteOptions extends Object implements Cloneable
Constructor and Description |
---|
UpdatedRouteOptions(Route route)
Initializes a new instance of the
RouteManager.UpdatedRouteOptions class. |
UpdatedRouteOptions(Route route,
GeoPoint currentLocation)
Initializes a new instance of the
RouteManager.UpdatedRouteOptions class. |
UpdatedRouteOptions(Route route,
GeoPoint currentLocation,
boolean returnBetterRoute,
boolean returnAlternateRoute)
Initializes a new instance of the
RouteManager.UpdatedRouteOptions class. |
Modifier and Type | Method and Description |
---|---|
RouteManager.UpdatedRouteOptions |
clone() |
RouteManager.UpdatedRouteOptions |
setCollapseManeuvers(boolean collapseManeuvers)
Set the flag to collapse the maneuvers of this route response.
|
RouteManager.UpdatedRouteOptions |
setCurrentLocation(GeoPoint point)
Sets the current location along the route.
|
void |
setLocale(Locale locale)
Set the locale of the
Route . |
T |
setOutputFields(int outputFields)
Sets what route information should be returned.
|
RouteManager.UpdatedRouteOptions |
setReturnAlternateRoute(boolean returnAlternateRoute)
Set whether or not to return an alternate route from the current location if available.
|
RouteManager.UpdatedRouteOptions |
setReturnBetterRoute(boolean returnBetterRoute)
Set whether or not to return a better route from the current location if available.
|
RouteManager.UpdatedRouteOptions |
setRoute(Route route)
Sets the route to request updated information for.
|
T |
setRouteRequestTime(RouteManager.RequestTime type,
Date time)
Set the request time for the current route request.
|
T |
setRouteType(RouteManager.RouteType routeType)
Set the
RouteManager.RouteType for this request. |
T |
setSpeedBucketsEnabled(boolean enableSpeedBuckets)
Enable or disable speed buckets in the request.
|
T |
setTolerance(int tolerance)
Sets the tolerance, which affects the number of latitude/longitude
points returned.
|
T |
setUnits(UserPreferences.Unit units)
Sets units explicitly for this route request.
|
T |
setUseTraffic(boolean useTraffic)
Set the flag to use or not use traffic while finding a route.
|
String |
toString() |
public UpdatedRouteOptions(Route route)
RouteManager.UpdatedRouteOptions
class.route
- The route to retrieve updated information for.public UpdatedRouteOptions(Route route, GeoPoint currentLocation)
RouteManager.UpdatedRouteOptions
class.route
- The route to retrieve updated information for.currentLocation
- The current location along the route. See RouteManager.UpdatedRouteOptions.setCurrentLocation(com.inrix.sdk.model.GeoPoint)
.public UpdatedRouteOptions(Route route, GeoPoint currentLocation, boolean returnBetterRoute, boolean returnAlternateRoute)
RouteManager.UpdatedRouteOptions
class.route
- The route to retrieve updated information for.currentLocation
- The current location along the route. See RouteManager.UpdatedRouteOptions.setCurrentLocation(com.inrix.sdk.model.GeoPoint)
.returnBetterRoute
- A flag for returning a better route if available. See RouteManager.UpdatedRouteOptions.setReturnBetterRoute(boolean)
.returnAlternateRoute
- A flag for returning an alternate route if available. See RouteManager.UpdatedRouteOptions.setReturnAlternateRoute(boolean)
.public RouteManager.UpdatedRouteOptions setRoute(Route route)
route
- The route.RouteManager.UpdatedRouteOptions
class.RouteManager.RouteManagerException
- when route is null, doesn't contain any
points, or only contains only one point.public RouteManager.UpdatedRouteOptions setCurrentLocation(GeoPoint point)
Route.getPoints()
, Route.getSpeedBuckets()
,
and Route.getBoundingBox()
.point
- The current location.RouteManager.UpdatedRouteOptions
class.RouteManager.RouteManagerException
- when the point is invalid.public RouteManager.UpdatedRouteOptions setReturnBetterRoute(boolean returnBetterRoute)
returnBetterRoute
- True to get a better route if available, false otherwise.RouteManager.UpdatedRouteOptions
class.RouteManager.UpdatedRouteOptions.setCurrentLocation(com.inrix.sdk.model.GeoPoint)
public RouteManager.UpdatedRouteOptions setReturnAlternateRoute(boolean returnAlternateRoute)
returnAlternateRoute
- True to get an alternate route if available, false otherwise.RouteManager.UpdatedRouteOptions
class.RouteManager.UpdatedRouteOptions.setCurrentLocation(com.inrix.sdk.model.GeoPoint)
public RouteManager.UpdatedRouteOptions setCollapseManeuvers(boolean collapseManeuvers)
collapseManeuvers
- If true, minor maneuvers are collapsed into one. If false, no
maneuvers are collapsed.RouteManager.UpdatedRouteOptions
class.public RouteManager.UpdatedRouteOptions clone()
public T setTolerance(int tolerance)
tolerance
- The tolerance value in yards or meters, depending on the
units set in the user preferences.RouteManager.RouteManagerException
- when tolerance is less than zero.public T setSpeedBucketsEnabled(boolean enableSpeedBuckets)
enableSpeedBuckets
- true
to enabled speed buckets, false
otherwisepublic T setOutputFields(int outputFields)
RouteManager.ROUTE_OUTPUT_FIELD_SUMMARY
| RouteManager.ROUTE_OUTPUT_FIELD_WAYPOINTS
.outputFields
- Fields to return for route information.RouteManager.RouteManagerException
- when outputFields is invalid.public T setUnits(UserPreferences.Unit units)
units
- The units of this request.RouteManager.RouteManagerException
- Thrown when units
is null.public T setRouteRequestTime(RouteManager.RequestTime type, Date time)
type
- An instance of enum RouteManager.RequestTime
which denotes if the time is RouteManager.RequestTime.DEPARTURE_TIME
or RouteManager.RequestTime.DEPARTURE_TIME
.
Note:- if the type is RouteManager.RequestTime.DEPARTURE_TIME
and
passed in a time in the past, then the requests get time stamped with the current time stamp.time
- The time associated with the current route request.public T setUseTraffic(boolean useTraffic)
useTraffic
- - if true traffic is considered while calculating the
route - if false traffic is not considered.public T setRouteType(RouteManager.RouteType routeType)
RouteManager.RouteType
for this request.routeType
- - Fastest or shortest RouteManager.RouteType
.RouteManager.RouteManagerException
- Thrown when routeType
is null.Copyright © 2013-2018 INRIX, Inc. All Rights Reserved.