public static final class GetRouteCostMatrixRequest.Builder extends Object
GetRouteCostMatrixRequest object.| Constructor and Description |
|---|
Builder(List<IPoint> startPoints,
List<IPoint> endPoints)
Creates the GetRouteCostMatrixRequest.Builder object.
|
| Modifier and Type | Method and Description |
|---|---|
GetRouteCostMatrixRequest.Builder |
avoidTollRoad(boolean avoidTollRoad)
Sets whether to calculate the route using only toll roads.
|
GetRouteCostMatrixRequest |
build()
Create the
GetRouteCostMatrixRequest object. |
GetRouteCostMatrixRequest.Builder |
DBResource(String dbResource)
Sets the Database resource to be used for this request.
|
GetRouteCostMatrixRequest.Builder |
destinationSrs(CoordSys destinationSrs)
Sets the Destination Coordinate System for points in response.
|
GetRouteCostMatrixRequest.Builder |
distanceUnit(LinearUnit distanceUnit)
Sets the Distance Unit in which the route distance is to be returned.
|
GetRouteCostMatrixRequest.Builder |
historicSpeedBucket(HistoricSpeedBucket historicSpeedBucket)
Sets the Historic Speed bucket to be used while processing this
request.
|
GetRouteCostMatrixRequest.Builder |
localRoadsLoadFactor(int localRoadsLoadFactor)
Sets the localRoadsLoadFactor for this request.
|
GetRouteCostMatrixRequest.Builder |
majorRoads(boolean majorRoads)
Sets whether to calculate the route using only major roads.
|
GetRouteCostMatrixRequest.Builder |
optimizeBy(OptimizeBy optimizeBy)
Sets whether the fastest or shortest route is to be calculated.
|
GetRouteCostMatrixRequest.Builder |
returnOptimalRoutesOnly(boolean returnOptimalRoutesOnly)
Sets whether to return only optimal route costs or complete route
cost matrix.
|
GetRouteCostMatrixRequest.Builder |
roadTypePreferences(Map<RoadType,RoadTypePriority> roadTypePreferences)
|
GetRouteCostMatrixRequest.Builder |
timeUnit(TimeUnit timeUnit)
Sets the Time Unit in which the route time is to be returned.
|
GetRouteCostMatrixRequest.Builder |
updates(List<Update> updates)
|
GetRouteCostMatrixRequest.Builder |
vehicleAttr(VehicleAttributes vehicleAttr)
Sets the Commercial Vehicle Restrictions value to be used while
processing this request.
|
public Builder(List<IPoint> startPoints, List<IPoint> endPoints) throws RoutingException
startPoints - List of IPoint containing the coordinates
of the point from which route needs to be calculated.endPoints - List of IPoint containing the coordinates
of the point to which route needs to be calculated.RoutingException - If something goes wrong while processing the request.public GetRouteCostMatrixRequest build() throws RoutingException
GetRouteCostMatrixRequest object.GetRouteCostMatrixRequest object.RoutingException - If something goes wrong while processing the request.public GetRouteCostMatrixRequest.Builder distanceUnit(LinearUnit distanceUnit)
distanceUnit - LinearUnit value in which route distance to be
returned. Defaults to LinearUnit.METER.public GetRouteCostMatrixRequest.Builder timeUnit(TimeUnit timeUnit)
timeUnit - TimeUnit value in which route time to be returned.
Defaults to TimeUnit.MINUTE.public GetRouteCostMatrixRequest.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 GetRouteCostMatrixRequest.Builder returnOptimalRoutesOnly(boolean returnOptimalRoutesOnly)
returnOptimalRoutesOnly - A boolean, true value means only optimal route costs,
false means return complete route cost matrix. Defaults to
false.public GetRouteCostMatrixRequest.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 GetRouteCostMatrixRequest.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 GetRouteCostMatrixRequest.Builder avoidTollRoad(boolean avoidTollRoad)
avoidTollRoad - A boolean, true = the request should avoid toll roads;
false = the request should include toll roadspublic GetRouteCostMatrixRequest.Builder destinationSrs(CoordSys destinationSrs)
destinationSrs - CoordSys, coordinate system for points in
response. Default is
CoordSysConstants.longLatWGS84.public GetRouteCostMatrixRequest.Builder historicSpeedBucket(HistoricSpeedBucket historicSpeedBucket)
historicSpeedBucket - HistoricSpeedBucket to be used for request.
Default is HistoricSpeedBucket.NONE.public GetRouteCostMatrixRequest.Builder vehicleAttr(VehicleAttributes vehicleAttr) throws RoutingException
vehicleAttr - VehicleAttributes to be used for request.RoutingExceptionpublic GetRouteCostMatrixRequest.Builder DBResource(String dbResource)
dbResource - Database resource to be used for processing the request.public GetRouteCostMatrixRequest.Builder updates(List<Update> updates)
updates - list to be used while processing this request.public GetRouteCostMatrixRequest.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.