public static final class GetRouteRequest.Builder extends Object
GetRouteRequest object.| Constructor and Description |
|---|
Builder(IPoint startPoint,
IPoint endPoint)
Creates the GetRouteRequest.Builder object.
|
| Modifier and Type | Method and Description |
|---|---|
GetRouteRequest.Builder |
avoidTollRoad(boolean avoidTollRoad)
Sets whether to calculate the route using only toll roads.
|
GetRouteRequest |
build()
Create the
GetRouteRequest object. |
GetRouteRequest.Builder |
DBResource(String dbResource)
Sets the Database resource to be used for this request.
|
GetRouteRequest.Builder |
destinationSrs(CoordSys destinationSrs)
Sets the Destination Coordinate System for points in response.
|
GetRouteRequest.Builder |
distanceUnit(LinearUnit distanceUnit)
Sets the Distance Unit in which route distance to be returned.
|
GetRouteRequest.Builder |
historicSpeedBucket(HistoricSpeedBucket historicSpeedBucket)
Sets the Historic Speed bucket to be used while processing this
request.
|
GetRouteRequest.Builder |
intermediatePoints(List<IPoint> intermediatePoints)
Sets the list of Intermediate Points via which route is to be
calculated.
|
GetRouteRequest.Builder |
language(Language language)
Sets the language in which turn by turn directions for route are to
be returned.
|
GetRouteRequest.Builder |
localRoadsLoadFactor(int localRoadsLoadFactor)
Sets the localRoadsLoadFactor for this request.
|
GetRouteRequest.Builder |
majorRoads(boolean majorRoads)
Sets whether to calculate the route using only major roads.
|
GetRouteRequest.Builder |
optimizeBy(OptimizeBy optimizeBy)
Sets whether the fastest or shortest route is to be calculated.
|
GetRouteRequest.Builder |
optimizeIntermediatePoints(boolean optimizeIntermediatePoints)
Sets whether to optimize the sequence of intermediate points for
route calculation if multiple intermediate points specified.
|
GetRouteRequest.Builder |
returnDirectionGeometry(boolean returnDirectionGeometry)
Returns whether to return direction geometry with
RouteInstruction or not in route response. |
GetRouteRequest.Builder |
returnDirections(boolean returnDirections)
Set whether to return turn by turn directions or not in route
response.
|
GetRouteRequest.Builder |
returnSegmentGeometry(boolean returnSegmentGeometry)
Sets whether to return route geometry or not in route response.
|
GetRouteRequest.Builder |
roadTypePreferences(Map<RoadType,RoadTypePriority> roadTypePreferences)
|
GetRouteRequest.Builder |
timeUnit(TimeUnit timeUnit)
Sets the Time Unit in which route time is to be returned.
|
GetRouteRequest.Builder |
updates(List<Update> updates)
|
GetRouteRequest.Builder |
vehicleAttr(VehicleAttributes vehicleAttr)
Sets the Commercial Vehicle Restrictions value to be used while
processing this request.
|
public Builder(IPoint startPoint, IPoint endPoint) throws RoutingException
startPoint - Instance of IPoint containing the coordinates of
the point from which the route needs to be calculated.endPoint - Instance of IPoint containing the coordinates of
the point to which the route needs to be calculated.RoutingException - If something goes wrong while processing the request.public GetRouteRequest build() throws RoutingException
GetRouteRequest object.GetRouteRequest object.RoutingException - If something goes wrong while processing the request.public GetRouteRequest.Builder distanceUnit(LinearUnit distanceUnit)
distanceUnit - LinearUnit value in which route distance to be
returned. Defaults to LinearUnit.METER.public GetRouteRequest.Builder timeUnit(TimeUnit timeUnit)
timeUnit - TimeUnit value in which route time is to be
returned. Defaults to TimeUnit.MINUTE.public GetRouteRequest.Builder intermediatePoints(List<IPoint> intermediatePoints)
public GetRouteRequest.Builder optimizeBy(OptimizeBy optimizeBy)
OptimizeBy.TIME means fastest and OptimizeBy.DISTANCE
means shortest.optimizeBy - The optimization parameter for route calculation. Defaults
to OptimizeBy.TIME.public GetRouteRequest.Builder language(Language language)
language - A Language in which turn by turn directions for
route are to be returned. Default is
Language.ENGLISH.public GetRouteRequest.Builder returnDirections(boolean returnDirections)
returnDirections - A boolean, true if turn by turn directions to return for
route, false otherwise. Defaults to false.public GetRouteRequest.Builder returnSegmentGeometry(boolean returnSegmentGeometry)
returnSegmentGeometry - A boolean, true if route geometry to be returned or not in
route response, false otherwise. Defaults to false.public GetRouteRequest.Builder optimizeIntermediatePoints(boolean optimizeIntermediatePoints)
optimizeIntermediatePoints - A boolean, true if the sequence of intermediate points for
route calculation to be optimized, false otherwise
Defaults to false.public GetRouteRequest.Builder roadTypePreferences(Map<RoadType,RoadTypePriority> roadTypePreferences)
Map of RoadType and their
RoadTypePriority. Used to force usage or avoid certain type
of roads while route calculation.roadTypePreferences - Map of RoadType and their
RoadTypePriority.public GetRouteRequest.Builder majorRoads(boolean majorRoads)
majorRoads - A boolean, true value means boundary is calculated using
major roads only, false means minor roads are also
considered. Defaults to false.public GetRouteRequest.Builder avoidTollRoad(boolean avoidTollRoad)
avoidTollRoad - A boolean, true = the request should avoid toll roads;
false = the request should include toll roadspublic GetRouteRequest.Builder destinationSrs(CoordSys destinationSrs)
destinationSrs - CoordSys, coordinate system for points in
response. Default is
CoordSysConstants.longLatWGS84public GetRouteRequest.Builder historicSpeedBucket(HistoricSpeedBucket historicSpeedBucket)
historicSpeedBucket - HistoricSpeedBucket to be used for request.
Default is HistoricSpeedBucket.NONE.public GetRouteRequest.Builder vehicleAttr(VehicleAttributes vehicleAttr) throws RoutingException
vehicleAttr - VehicleAttributes to be used for request.RoutingExceptionpublic GetRouteRequest.Builder DBResource(String dbResource)
dbResource - Database resource to be used for processing the request.public GetRouteRequest.Builder returnDirectionGeometry(boolean returnDirectionGeometry)
RouteInstruction or not in route response.RouteInstruction for route, false otherwise. Defaults
to false.public GetRouteRequest.Builder updates(List<Update> updates)
updates - list to be used while processing this request.public GetRouteRequest.Builder localRoadsLoadFactor(int localRoadsLoadFactor)
localRoadsLoadFactor - - localRoadsLoadFactor used for loading minor roads in memory for route
calculation. Value should be between 1 and 3 both inclusive.