类 BannerInstructions

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

public abstract class BannerInstructions extends DirectionsJsonObject
Visual instruction information related to a particular LegStep useful for making UI elements inside your application such as banners. To receive this information, your request must NbmapDirections.Builder#bannerInstructions() have set to true.
另请参阅:
  • 构造器详细资料

    • BannerInstructions

      public BannerInstructions()
  • 方法详细资料

    • builder

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

      public abstract double distanceAlongGeometry()
      Distance in meters from the beginning of the step at which the visual instruction should be visible.
      返回:
      double value representing the length from the steps first point to where the banner instruction should be displayed
    • primary

      @NonNull public abstract BannerText primary()
      A plain text representation stored inside a BannerText object.
      返回:
      a BannerText object which includes text for visually displaying current step information to the user
    • secondary

      @Nullable public abstract BannerText secondary()
      Ancillary visual information about the LegStep.
      返回:
      BannerText representing the secondary visual information
    • sub

      @Nullable public abstract BannerText sub()
      Additional information that is included if we feel the driver needs a heads up about something. Can include information about the next maneuver (the one after the upcoming one), if the step is short - can be null, or can be lane information. If we have lane information, that trumps information about the next maneuver.
      返回:
      BannerText representing the sub visual information
    • view

      @Nullable public abstract BannerView view()
      Optional image to display for an upcoming maneuver. Used to provide a visual for complex junctions and maneuver. If the step is short the image should be displayed for the duration of the step, otherwise it is shown as you approach the maneuver.
      返回:
      BannerView representing the secondary visual information
    • toBuilder

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

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