类 StepIntersection
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.StepIntersection
- 所有已实现的接口:
Serializable
Object representing an intersection along the step.
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static classThis builder can be used to set the values describing theStepIntersection. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract IntegerThe zero-based index into the admin list on the route leg for this intersection.bearings()An integer list of bearing values available at the step intersection.static StepIntersection.Builderbuilder()Create a new instance of this class by using theStepIntersection.Builderclass.classes()A list of strings signifying the classes of the road exiting the intersection.entry()A list of entry flags, corresponding in a 1:1 relationship to the bearings.static StepIntersectionCreate a new instance of this class by passing in a formatted valid JSON String.abstract IntegerThe zero-based index for the intersection.abstract Integerin()Index into bearings/entry array.abstract BooleanisUrban()A boolean indicating whether the road exiting the intersection is considered to be in an urban area.abstract List<IntersectionLanes>lanes()Array of lane objects that represent the available turn lanes at the intersection.ai.nextbillion.kits.geojson.Pointlocation()APointrepresenting this intersection location.abstract Integerout()Index out of the bearings/entry array.protected abstract double[]APointrepresenting this intersection location.abstract RestStoprestStop()An object containing information about passing rest stops along the route.abstract StepIntersection.BuilderConvert the currentStepIntersectionto its builder holding the currently assigned values.abstract TollCollectionAn object containing information about a toll collection point along the route.abstract StringName of the tunnel.static com.google.gson.TypeAdapter<StepIntersection>typeAdapter(com.google.gson.Gson gson) Gson type adapter for parsing Gson to this class.从类继承的方法 ai.nextbillion.kits.directions.models.DirectionsJsonObject
toJson
-
构造器详细资料
-
StepIntersection
public StepIntersection()
-
-
方法详细资料
-
builder
Create a new instance of this class by using theStepIntersection.Builderclass.- 返回:
- this classes
StepIntersection.Builderfor creating a new instance
-
location
@NonNull public ai.nextbillion.kits.geojson.Point location()APointrepresenting this intersection location.- 返回:
- GeoJson Point representing this intersection location
-
rawLocation
@NonNull @SerializedName("location") protected abstract double[] rawLocation()APointrepresenting this intersection location. Since the rawLocation isn't public, it's okay to be mutable as long as nothing in this SDK changes values.- 返回:
- GeoJson Point representing this intersection location
-
bearings
An integer list of bearing values available at the step intersection.- 返回:
- 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.
-
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
- tunnel: the road continues on a tunnel
- 返回:
- a string list containing the classes of the road exiting the intersection
-
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.- 返回:
- a list of entry flags, corresponding in a 1:1 relationship to the bearings
-
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.- 返回:
- index into bearings/entry array
-
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.- 返回:
- index out of the bearings/entry array
-
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.- 返回:
- array of lane objects that represent the available turn lanes at the intersection
-
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.- 返回:
- index for the intersection
-
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.- 返回:
- a value indicating whether the road exiting the intersection is in an urban area
-
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.- 返回:
- a zero-based index into the admin list on the route leg.
- 另请参阅:
-
restStop
An object containing information about passing rest stops along the route. Only available on the `driving` profile.- 返回:
- an object containing information about passing rest stops along the route.
-
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. Only available on theDirectionsCriteria.PROFILE_DRIVINGprofile.- 返回:
- an object containing information about a toll collection point along the route.
-
tunnelName
Name of the tunnel. Value may be present ifclasses()contains "tunnel".- 返回:
- name of the tunnel
-
toBuilder
Convert the currentStepIntersectionto its builder holding the currently assigned values. This allows you to modify a single property and then rebuild the object resulting in an updated and modifiedStepIntersection.- 返回:
- a
StepIntersection.Builderwith the same values set to match the ones defined in thisStepIntersection
-
typeAdapter
Gson type adapter for parsing Gson to this class.- 参数:
gson- the builtGsonobject- 返回:
- the type adapter for this class
-
fromJson
Create a new instance of this class by passing in a formatted valid JSON String.- 参数:
json- a formatted valid JSON string defining a StepIntersection- 返回:
- a new instance of this class defined by the values passed inside this static factory method
-