类 LegAnnotation

java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.LegAnnotation
所有已实现的接口:
Serializable

public abstract class LegAnnotation extends DirectionsJsonObject
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.
另请参阅:
  • 构造器详细资料

    • LegAnnotation

      public LegAnnotation()
  • 方法详细资料

    • builder

      public static LegAnnotation.Builder builder()
      Create a new instance of this class by using the LegAnnotation.Builder class.
      返回:
      this classes LegAnnotation.Builder for creating a new instance
    • distance

      @Nullable public abstract List<Double> 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

      @Nullable public abstract List<Double> 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

      @Nullable public abstract List<Double> 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

      @Nullable public abstract List<MaxSpeed> 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 MaxSpeed value between two of the routeLeg geometry coordinates
    • congestion

      @Nullable public abstract List<String> 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

      public abstract LegAnnotation.Builder toBuilder()
      Convert the current LegAnnotation to 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 modified LegAnnotation.
      返回:
      a LegAnnotation.Builder with the same values set to match the ones defined in this LegAnnotation
    • typeAdapter

      public static com.google.gson.TypeAdapter<LegAnnotation> typeAdapter(com.google.gson.Gson gson)
      Gson type adapter for parsing Gson to this class.
      参数:
      gson - the built Gson object
      返回:
      the type adapter for this class
    • fromJson

      public static LegAnnotation fromJson(String json)
      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