类 DirectionsRoute.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsRoute.Builder
- 封闭类:
- DirectionsRoute
This builder can be used to set the values describing the
DirectionsRoute.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract DirectionsRoutebuild()Build a newDirectionsRouteobject.abstract DirectionsRoute.BuilderThe distance traveled from origin to destination.abstract DirectionsRoute.BuilderThe estimated travel time from origin to destination.abstract DirectionsRoute.BuilderdurationTypical(Double durationTypical) The typical travel time from this route's origin to destination.abstract DirectionsRoute.BuilderGives the geometry of the route.abstract DirectionsRoute.BuilderA Leg is a route between only two waypoints.abstract DirectionsRoute.BuilderrouteOptions(RouteOptions routeOptions) Holds onto the parameter information used when making the directions request.abstract DirectionsRoute.BuildervoiceLanguage(String voiceLanguage) String of the language to be used for voice instructions.abstract DirectionsRoute.BuilderThe calculated weight of the route.abstract DirectionsRoute.BuilderweightName(String weightName) The name of the weight profile used while calculating during extraction phase.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
distance
The distance traveled from origin to destination.- 参数:
distance- a double number with unit meters- 返回:
- this builder for chaining options together
-
duration
The estimated travel time from origin to destination.- 参数:
duration- a double number with unit seconds- 返回:
- this builder for chaining options together
-
durationTypical
The typical travel time from this route's origin to destination. There's a delay along this route if you subtract this durationTypical() value from the route's duration() value and the resulting difference is greater than 0. The delay is because of any number of real-world situations (road repair, traffic jam, etc).- 参数:
durationTypical- a double number with unit seconds- 返回:
- this builder for chaining options together
-
geometry
Gives the geometry of the route. Commonly used to draw the route on the map view.- 参数:
geometry- an encoded polyline string- 返回:
- this builder for chaining options together
-
weight
The calculated weight of the route.- 参数:
weight- the weight value provided from the API as adoublevalue- 返回:
- this builder for chaining options together
-
weightName
The name of the weight profile used while calculating during extraction phase. The default isroutabilitywhich is duration based, with additional penalties for less desirable maneuvers.- 参数:
weightName- a String representing the weight profile used while calculating the route- 返回:
- this builder for chaining options together
-
legs
A Leg is a route between only two waypoints.- 参数:
legs- list ofRouteLegobjects- 返回:
- this builder for chaining options together
-
routeOptions
Holds onto the parameter information used when making the directions request.- 参数:
routeOptions- aRouteOptionss object which holds onto critical information from the request that cannot be derived directly from the directions route- 返回:
- this builder for chaining options together
-
voiceLanguage
String of the language to be used for voice instructions. Defaults to en, and can be any accepted instruction language.- 参数:
voiceLanguage- String compatible with voice instructions, null otherwise- 返回:
- this builder for chaining options together
-
build
Build a newDirectionsRouteobject.- 返回:
- a new
DirectionsRouteusing the provided values in this builder
-