public static final class RouteManager.RequestRouteOptions extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
MAX_WAYPOINT_SIZE
Maximum number of waypoints allowed.
|
Constructor and Description |
---|
RequestRouteOptions(GeoPoint start,
GeoPoint end)
Initializes a new instance of the
RouteManager.RequestRouteOptions class. |
RequestRouteOptions(SavedTrip savedTrip)
Initializes a new instance of
RouteManager.RequestRouteOptions using the supplied trip. |
Modifier and Type | Method and Description |
---|---|
RouteManager.RequestRouteOptions |
clone() |
RouteManager.RequestRouteOptions |
setCollapseManeuver(boolean collapseManeuver)
Set the flag to collapse the maneuvers of this route response.
|
RouteManager.RequestRouteOptions |
setCriteria(int criteria)
Set the criteria for this route find request.
|
RouteManager.RequestRouteOptions |
setEnd(GeoPoint point)
Sets the ending location of the route.
|
RouteManager.RequestRouteOptions |
setHeading(Integer heading)
Sets the heading, which is direction the user is going.
|
void |
setLocale(Locale locale)
Set the locale of the
Route . |
RouteManager.RequestRouteOptions |
setNumAlternates(int numAlternates)
Sets the number of alternate routes to be calculated.
|
T |
setOutputFields(int outputFields)
Sets what route information should be returned.
|
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.
|
RouteManager.RequestRouteOptions |
setStart(GeoPoint point)
Sets the starting location of the route.
|
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.
|
RouteManager.RequestRouteOptions |
setWaypoints(List<GeoPoint> waypoints)
Sets the optional waypoints, which are points that the route will go through in
between the start and end points.
|
String |
toString() |
public static final int MAX_WAYPOINT_SIZE
public RequestRouteOptions(GeoPoint start, GeoPoint end)
RouteManager.RequestRouteOptions
class.start
- The route starting location.end
- The route ending location.RouteManager.RouteManagerException
- Thrown when
start
is invalid.end
is invalid.public RequestRouteOptions(SavedTrip savedTrip)
RouteManager.RequestRouteOptions
using the supplied trip.savedTrip
- The trip that a route will be requested for.RouteManager.RouteManagerException
- Thrown when
savedTrip
is invalid.savedTrip
has invalid origin. See: SavedTrip.getOrigin()
.savedTrip
has invalid destination. See: SavedTrip.getDestination()
.savedTrip
has one or more invalid waypoints.See: SavedTrip.getWaypoints()
.public RouteManager.RequestRouteOptions setStart(GeoPoint point)
point
- The route start location.RouteManager.RequestRouteOptions
class.RouteManager.RouteManagerException
- when the start point is invalid.public RouteManager.RequestRouteOptions setEnd(GeoPoint point)
point
- The route end location.RouteManager.RequestRouteOptions
class.RouteManager.RouteManagerException
- when the end point is invalid.public RouteManager.RequestRouteOptions setWaypoints(List<GeoPoint> waypoints)
waypoints
- The route waypoints.RouteManager.RequestRouteOptions
class.RouteManager.RouteManagerException
- when waypoints is null, is empty,
contains invalid waypoints or too many waypoints 8.public RouteManager.RequestRouteOptions setHeading(Integer heading)
heading
- The heading value in degrees. Accepted range is 0 to 360,
where 0 degrees is North.RouteManager.RequestRouteOptions
class.RouteManager.RouteManagerException
- when the heading is out of range.public RouteManager.RequestRouteOptions setNumAlternates(int numAlternates)
numAlternates
- The number of alternate routes to request.RouteManager.RequestRouteOptions
class.public RouteManager.RequestRouteOptions setCollapseManeuver(boolean collapseManeuver)
collapseManeuver
- true
to collapse the maneuvers, false
otherwise.RouteManager.RequestRouteOptions
class.public RouteManager.RequestRouteOptions setCriteria(int criteria)
criteria
- - number containing the route find criteria.RouteManager.RequestRouteOptions
class.public RouteManager.RequestRouteOptions 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.