类 LegAnnotation
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.LegAnnotation
- 所有已实现的接口:
Serializable
An annotations object that contains additional details about each line segment along the route
geometry. Each entry in an annotations field corresponds to a coordinate along the route
geometry.
- 另请参阅:
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static LegAnnotation.Builderbuilder()Create a new instance of this class by using theLegAnnotation.Builderclass.The congestion between each pair of coordinates.distance()The distance, in meters, between each pair of coordinates.duration()The speed, in meters per second, between each pair of coordinates.static LegAnnotationCreate a new instance of this class by passing in a formatted valid JSON String.maxspeed()The posted speed limit, between each pair of coordinates.speed()The speed, in meters per second, between each pair of coordinates.abstract LegAnnotation.BuilderConvert the currentLegAnnotationto its builder holding the currently assigned values.static com.google.gson.TypeAdapter<LegAnnotation>typeAdapter(com.google.gson.Gson gson) Gson type adapter for parsing Gson to this class.从类继承的方法 ai.nextbillion.kits.directions.models.DirectionsJsonObject
toJson
-
构造器详细资料
-
LegAnnotation
public LegAnnotation()
-
-
方法详细资料
-
builder
Create a new instance of this class by using theLegAnnotation.Builderclass.- 返回:
- this classes
LegAnnotation.Builderfor creating a new instance
-
distance
The distance, in meters, between each pair of coordinates.- 返回:
- a list with each entry being a distance value between two of the routeLeg geometry coordinates
-
duration
The speed, in meters per second, between each pair of coordinates.- 返回:
- a list with each entry being a speed value between two of the routeLeg geometry coordinates
-
speed
The speed, in meters per second, between each pair of coordinates.- 返回:
- a list with each entry being a speed value between two of the routeLeg geometry coordinates
-
maxspeed
The posted speed limit, between each pair of coordinates. Maxspeed is only available for the `nbmap/driving` and `nbmap/driving-traffic` profiles, other profiles will return `unknown`s only.- 返回:
- a list with each entry being a
MaxSpeedvalue between two of the routeLeg geometry coordinates
-
congestion
The congestion between each pair of coordinates.- 返回:
- a list of Strings with each entry being a congestion value between two of the routeLeg geometry coordinates
-
toBuilder
Convert the currentLegAnnotationto 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 modifiedLegAnnotation.- 返回:
- a
LegAnnotation.Builderwith the same values set to match the ones defined in thisLegAnnotation
-
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 LegAnnotation- 返回:
- a new instance of this class defined by the values passed inside this static factory method
-