类 BannerView

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

public abstract class BannerView extends DirectionsJsonObject
Includes both plain text information that can be visualized inside your navigation application along with the text string broken down into BannerComponents which may or may not include a image url. To receive this information, your request must have NbmapDirections.Builder#bannerInstructions() set to true.
另请参阅:
  • 构造器详细资料

    • BannerView

      public BannerView()
  • 方法详细资料

    • builder

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

      @NonNull public abstract String text()
      Plain text with all the BannerComponents text combined.
      返回:
      plain text with all the BannerComponents text items combined
    • components

      @Nullable public abstract List<BannerComponents> components()
      A part or element of the BannerInstructions.
      返回:
      a BannerComponents specific to a LegStep
    • type

      @Nullable public abstract String type()
      This indicates the type of maneuver.
      返回:
      String with type of maneuver
      另请参阅:
    • modifier

      @Nullable public abstract 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.
      返回:
      String with modifier
    • toBuilder

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

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