类 StepManeuver.Builder

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

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

    • Builder

      public Builder()
  • 方法详细资料

    • rawLocation

      public abstract StepManeuver.Builder rawLocation(@NonNull double[] rawLocation)
      The rawLocation as a double array. Once the StepManeuver object's created, this raw location gets converted into a Point object 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
    • bearingBefore

      public abstract StepManeuver.Builder bearingBefore(@Nullable Double bearingBefore)
      Number between 0 and 360 indicating the clockwise angle from true north to the direction of travel right before the maneuver.
      参数:
      bearingBefore - double with value from 0 to 360
      返回:
      this builder for chaining options together
    • bearingAfter

      public abstract StepManeuver.Builder bearingAfter(@Nullable Double bearingAfter)
      Number between 0 and 360 indicating the clockwise angle from true north to the direction of travel right after the maneuver.
      参数:
      bearingAfter - double with value from 0 to 360
      返回:
      this builder for chaining options together
    • instruction

      public abstract StepManeuver.Builder instruction(@Nullable String instruction)
      A human-readable instruction of how to execute the returned maneuver. This String is built using OSRM-Text-Instructions and can be further customized inside either the Nbmap Navigation SDK for Android or using the OSRM-Text-Instructions.java project in Project-OSRM.
      参数:
      instruction - String with instruction
      返回:
      this builder for chaining options together
      另请参阅:
    • type

      public abstract StepManeuver.Builder type(@Nullable String type)
      This indicates the type of maneuver. See StepManeuver.type() for a full list of options.
      参数:
      type - String with type of maneuver
      返回:
      this builder for chaining options together
      另请参阅:
    • modifier

      public abstract StepManeuver.Builder modifier(@Nullable String modifier)
      This indicates the mode of the maneuver. If type is of turn, the modifier indicates the change in direction accomplished through the turn. If the type is of depart/arrive, the modifier indicates the position of waypoint from the current direction of travel.
      参数:
      modifier - String with modifier
      返回:
      this builder for chaining options together
    • muted

      public abstract StepManeuver.Builder muted(boolean muted)
      Check whether mute the voice instructions.
      返回:
      true if mute the voice.
    • exit

      public abstract StepManeuver.Builder exit(@Nullable Integer exit)
      An optional integer indicating number of the exit to take. If exit is undefined the destination is on the roundabout. The property exists for the following type properties:

      else - indicates the number of intersections passed until the turn. roundabout - traverse roundabout rotary - a traffic circle

      参数:
      exit - an integer indicating number of the exit to take
      返回:
      this builder for chaining options together
    • build

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