类 LegAnnotation.Builder

java.lang.Object
ai.nextbillion.kits.directions.models.LegAnnotation.Builder
封闭类:
LegAnnotation

public abstract static class LegAnnotation.Builder extends Object
This builder can be used to set the values describing the LegAnnotation.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • distance

      public abstract LegAnnotation.Builder distance(@Nullable List<Double> distance)
      The distance, in meters, between each pair of coordinates.
      参数:
      distance - a list with each entry being a distance value between two of the routeLeg geometry coordinates
      返回:
      this builder for chaining options together
    • duration

      public abstract LegAnnotation.Builder duration(@Nullable List<Double> duration)
      The speed, in meters per second, between each pair of coordinates.
      参数:
      duration - a list with each entry being a speed value between two of the routeLeg geometry coordinates
      返回:
      this builder for chaining options together
    • speed

      public abstract LegAnnotation.Builder speed(@Nullable List<Double> speed)
      The speed, in meters per second, between each pair of coordinates.
      参数:
      speed - a list with each entry being a speed value between two of the routeLeg geometry coordinates
      返回:
      this builder for chaining options together
    • maxspeed

      public abstract LegAnnotation.Builder maxspeed(@Nullable 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.
      参数:
      maxspeed - list of speeds between each pair of coordinates
      返回:
      this builder for chaining options together
    • congestion

      public abstract LegAnnotation.Builder congestion(@Nullable List<String> congestion)
      The congestion between each pair of coordinates.
      参数:
      congestion - a list of Strings with each entry being a congestion value between two of the routeLeg geometry coordinates
      返回:
      this builder for chaining options together
    • build

      public abstract LegAnnotation build()
      Build a new LegAnnotation object.
      返回:
      a new LegAnnotation using the provided values in this builder