类 RouteLeg.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.RouteLeg.Builder
- 封闭类:
- RouteLeg
This builder can be used to set the values describing the
RouteLeg.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract RouteLeg.BuilderAn array of objects describing the administrative boundaries the route leg travels through.abstract RouteLeg.Builderannotation(LegAnnotation annotation) ALegAnnotationthat contains additional details about each line segment along the route geometry.abstract RouteLegbuild()Build a newRouteLegobject.abstract RouteLeg.BuilderA list of closures that occur on this leg.abstract RouteLeg.BuilderThe distance traveled from one waypoint to another.abstract RouteLeg.BuilderThe estimated travel time from one waypoint to another.abstract RouteLeg.BuilderdurationTypical(Double durationTypical) The typical travel time for traversing this RouteLeg.abstract RouteLeg.BuilderA list of incidents that occur on this leg.abstract RouteLeg.BuilderGives a List including all the steps to get from one waypoint to another.abstract RouteLeg.BuilderA short human-readable summary of major roads traversed.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
distance
The distance traveled from one waypoint to another.- 参数:
distance- a double number with unit meters- 返回:
- this builder for chaining options together
-
duration
The estimated travel time from one waypoint to another.- 参数:
duration- a double number with unit seconds- 返回:
- this builder for chaining options together
-
durationTypical
The typical travel time for traversing this RouteLeg. There's a delay along the RouteLeg if you subtract this durationTypical() value from the RouteLeg 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
-
summary
A short human-readable summary of major roads traversed. Useful to distinguish alternatives.- 参数:
summary- String with summary- 返回:
- this builder for chaining options together
-
admins
An array of objects describing the administrative boundaries the route leg travels through. UseStepIntersection.adminIndex()on the intersection object to look up the admin for each intersection in this array.- 参数:
admins- Array with admins- 返回:
- this builder for chaining options together
-
steps
Gives a List including all the steps to get from one waypoint to another.- 参数:
steps- List ofLegStep- 返回:
- this builder for chaining options together
-
incidents
A list of incidents that occur on this leg.- 参数:
incidents- a list ofIncident- 返回:
- this builder for chaining options together
-
annotation
ALegAnnotationthat contains additional details about each line segment along the route geometry. If you'd like to receiving this, you must request it inside your Directions request before executing the call.- 参数:
annotation- aLegAnnotationobject- 返回:
- this builder for chaining options together
-
closures
A list of closures that occur on this leg.- 参数:
closures- a list ofClosure- 返回:
- this builder for chaining options together
-
build
Build a newRouteLegobject.- 返回:
- a new
RouteLegusing the provided values in this builder
-