类 StepIntersection.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.StepIntersection.Builder
- 封闭类:
- StepIntersection
This builder can be used to set the values describing the
StepIntersection.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract StepIntersection.BuilderadminIndex(Integer adminIndex) The zero-based index into the admin list on the route leg for this intersection.abstract StepIntersection.BuilderAn integer array of bearing values available at the step intersection.abstract StepIntersectionbuild()Build a newStepIntersectionobject.abstract StepIntersection.BuilderA list of strings signifying the classes of the road exiting the intersection.abstract StepIntersection.BuilderA list of entry flags, corresponding in a 1:1 relationship to the bearings.abstract StepIntersection.BuildergeometryIndex(Integer geometryIndex) The zero-based index for the intersection.abstract StepIntersection.BuilderIndex into bearings/entry array.abstract StepIntersection.BuilderA boolean indicating whether the road exiting the intersection is considered to be in an urban area.abstract StepIntersection.Builderlanes(List<IntersectionLanes> lanes) Array of lane objects that represent the available turn lanes at the intersection.abstract StepIntersection.BuilderIndex out of the bearings/entry array.abstract StepIntersection.BuilderrawLocation(double[] rawLocation) The rawLocation as a double array.abstract StepIntersection.BuilderAn object containing information about passing rest stops along the route.abstract StepIntersection.BuildertollCollection(TollCollection tollCollection) An object containing information about a toll collection point along the route.abstract StepIntersection.BuildertunnelName(String tunnelName) Name of the tunnel.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
bearings
An integer array of bearing values available at the step intersection.- 参数:
bearing- An array of bearing values (for example [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection.- 返回:
- this builder for chaining options together
-
classes
A list of strings signifying the classes of the road exiting the intersection. Possible values:- toll: the road continues on a toll road
- ferry: the road continues on a ferry
- restricted: the road continues on with access restrictions
- motorway: the road continues on a motorway
- 参数:
classes- a list of strings containing the classes of the road exiting the intersection- 返回:
- this builder for chaining options together
-
entry
A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction.- 参数:
entry- aBooleanlist of entry flags, corresponding in a 1:1 relationship to the bearings- 返回:
- this builder for chaining options together
-
in
Index into bearings/entry array. Used to calculate the bearing before the turn. Namely, the clockwise angle from true north to the direction of travel before the maneuver/passing the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for departure maneuvers.- 参数:
in- index into bearings/entry array- 返回:
- this builder for chaining options together
-
out
Index out of the bearings/entry array. Used to extract the bearing after the turn. Namely, The clockwise angle from true north to the direction of travel after the maneuver/passing the intersection. The value is not supplied for arrive maneuvers.- 参数:
out- index out of the bearings/entry array- 返回:
- this builder for chaining options together
-
lanes
Array of lane objects that represent the available turn lanes at the intersection. If no lane information is available for an intersection, the lanes property will not be present. Lanes are provided in their order on the street, from left to right.- 参数:
lanes- array of lane objects that represent the available turn lanes at the intersection- 返回:
- this builder for chaining options together
-
geometryIndex
The zero-based index for the intersection. This value can be used to apply the duration annotation that corresponds with the intersection. Only available on the driving profile.- 参数:
geometryIndex- index for the intersection- 返回:
- this builder for chaining options together
-
isUrban
A boolean indicating whether the road exiting the intersection is considered to be in an urban area. This value is determined by the density of the surrounding road network. Only available on theDirectionsCriteria.PROFILE_DRIVINGprofile.- 参数:
isUrban- indicating whether the road exiting the intersection is in an urban area- 返回:
- this builder for chaining options together
-
adminIndex
The zero-based index into the admin list on the route leg for this intersection. Use this field to look up the ISO-3166-1 country code for this point on the route. Only available on the `driving` profile.- 参数:
adminIndex- zero-based index into the admin list on the route leg for this intersection- 返回:
- this builder for chaining options together
-
restStop
An object containing information about passing rest stops along the route. Only available on the `driving` profile.- 参数:
restStop- object containing information about passing rest stops along the route.- 返回:
- this builder for chaining options together
-
tollCollection
@Nullable public abstract StepIntersection.Builder tollCollection(@Nullable TollCollection tollCollection) An object containing information about a toll collection point along the route. This is a payment booth or overhead electronic gantry payment booth or overhead electronic gantry where toll charge is collected.- 参数:
tollCollection- object containing information about a toll collection point along the route.- 返回:
- this builder for chaining options together
-
tunnelName
Name of the tunnel. Value is present only if class is tunnel.- 参数:
tunnelName- name of the tunnel- 返回:
- this builder for chaining options together
-
rawLocation
The rawLocation as a double array. Once theStepIntersectionobject's created, this raw location gets converted into aPointobject and is public exposed as such. The double array should have a length of two, index 0 being the longitude and index 1 being latitude.- 参数:
rawLocation- a double array with a length of two, index 0 being the longitude and index 1 being latitude.- 返回:
- this builder for chaining options together
-
build
Build a newStepIntersectionobject.- 返回:
- a new
StepIntersectionusing the provided values in this builder
-