类 LegStep

所有已实现的接口:
Serializable

public abstract class LegStep extends DirectionsJsonObject
Includes one StepManeuver object and travel to the following LegStep.
另请参阅:
  • 字段详细资料

  • 构造器详细资料

    • LegStep

      public LegStep()
  • 方法详细资料

    • builder

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

      public abstract double distance()
      The distance traveled from the maneuver to the next LegStep.
      返回:
      a double number with unit meters
    • duration

      public abstract double duration()
      The estimated travel time from the maneuver to the next LegStep.
      返回:
      a double number with unit seconds
    • durationTypical

      @Nullable @SerializedName("duration_typical") public abstract Double durationTypical()
      The typical travel time for traversing this LegStep. There's a delay along the LegStep if you subtract this durationTypical() value from the LegStep duration() value and the resulting difference is greater than 0. The delay is because of any number of real-world situations (road repair, traffic jam, etc).
      返回:
      a double number with unit seconds
    • speedLimitUnit

      @Nullable public abstract String speedLimitUnit()
      Speed limit unit as per the locale.
      返回:
      unit of the speed limit
    • speedLimitSign

      @Nullable public abstract String speedLimitSign()
      Speed limit sign type.
      另请参阅:
    • geometry

      @Nullable public abstract String geometry()
      Gives the geometry of the leg step.
      返回:
      an encoded polyline string
    • name

      @Nullable public abstract String name()
      String with the name of the way along which the travel proceeds.
      返回:
      a String representing the way along which the travel proceeds
    • ref

      @Nullable public abstract String ref()
      Any road designations associated with the road or path leading from this step's maneuver to the next step's maneuver. Optionally included, if data is available. If multiple road designations are associated with the road, they are separated by semicolons. A road designation typically consists of an alphabetic network code (identifying the road type or numbering system), a space or hyphen, and a route number. You should not assume that the network code is globally unique: for example, a network code of "NH" may appear on a "National Highway" or "New Hampshire". Moreover, a route number may not even uniquely identify a road within a given network.
      返回:
      String with reference number or code of the way along which the travel proceeds. Optionally included, if data is available.
    • destinations

      @Nullable public abstract String destinations()
      String with the destinations of the way along which the travel proceeds.
      返回:
      String with the destinations of the way along which the travel proceeds. Optionally included, if data is available
    • mode

      @NonNull public abstract String mode()
      indicates the mode of transportation in the step.
      返回:
      String indicating the mode of transportation.
    • pronunciation

      @Nullable public abstract String pronunciation()
      The pronunciation hint of the way name. Will be undefined if no pronunciation is hit.
      返回:
      String with the pronunciation
    • rotaryName

      @Nullable @SerializedName("rotary_name") public abstract String rotaryName()
      An optional string indicating the name of the rotary. This will only be a nonnull when the maneuver type equals rotary.
      返回:
      String with the rotary name
    • rotaryPronunciation

      @Nullable @SerializedName("rotary_pronunciation") public abstract String rotaryPronunciation()
      An optional string indicating the pronunciation of the name of the rotary. This will only be a nonnull when the maneuver type equals rotary.
      返回:
      String in IPA with the rotary name's pronunciation.
    • maneuver

      @NonNull public abstract StepManeuver maneuver()
      A StepManeuver object that typically represents the first coordinate making up the geometry().
      返回:
      new StepManeuver object
    • voiceInstructions

      @Nullable public abstract List<VoiceInstructions> voiceInstructions()
      The voice instructions object is useful for navigation sessions providing well spoken text instructions along with the distance from the maneuver the instructions should be said.
      返回:
      a list of voice instructions which can be triggered on this current step
    • bannerInstructions

      @Nullable public abstract List<BannerInstructions> bannerInstructions()
      If in your request you set NbmapDirections.Builder#bannerInstructions() to true, you'll receive a list of BannerInstructions which encompasses all information necessary for creating a visual cue about a given LegStep.
      返回:
      a list of BannerInstructionss which help display visual cues inside your application
    • drivingSide

      @Nullable @SerializedName("driving_side") public abstract String drivingSide()
      The legal driving side at the location for this step. Result will either be left or right.
      返回:
      a string with either a left or right value
    • weight

      public abstract double weight()
      Specifies a decimal precision of edge weights, default value 1.
      返回:
      a decimal precision double value
    • intersections

      @Nullable public abstract List<StepIntersection> intersections()
      Provides a list of all the intersections connected to the current way the user is traveling along.
      返回:
      list of StepIntersection representing all intersections along the step
    • exits

      @Nullable public abstract String exits()
      String with the exit numbers or names of the way. Optionally included, if data is available.
      返回:
      a String identifying the exit number or name
    • toBuilder

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

      public static com.google.gson.TypeAdapter<LegStep> 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 LegStep 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 LegStep
      返回:
      a new instance of this class defined by the values passed inside this static factory method