类 WalkingOptions

java.lang.Object
ai.nextbillion.kits.directions.WalkingOptions

public abstract class WalkingOptions extends Object
Class for specifying options for use with the walking profile.
  • 构造器详细资料

    • WalkingOptions

      public WalkingOptions()
  • 方法详细资料

    • walkingSpeed

      @SerializedName("walking_speed") @Nullable public abstract Double walkingSpeed()
      Walking speed in meters per second. Must be between 0.14 and 6.94 meters per second. Defaults to 1.42 meters per second
      返回:
      walkingSpeed in meters per second
    • walkwayBias

      @SerializedName("walkway_bias") @Nullable public abstract Double walkwayBias()
      A bias which determines whether the route should prefer or avoid the use of roads or paths that are set aside for pedestrian-only use (walkways). The allowed range of values is from -1 to 1, where -1 indicates indicates preference to avoid walkways, 1 indicates preference to favor walkways, and 0 indicates no preference (the default).
      返回:
      walkwayBias bias to prefer or avoid walkways
    • alleyBias

      @SerializedName("alley_bias") @Nullable public abstract Double alleyBias()
      A bias which determines whether the route should prefer or avoid the use of alleys. The allowed range of values is from -1 to 1, where -1 indicates indicates preference to avoid alleys, 1 indicates preference to favor alleys, and 0 indicates no preference (the default).
      返回:
      alleyBias bias to prefer or avoid alleys
    • fromJson

      public static WalkingOptions 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 WalkingOptions object
      返回:
      a new instance of this class defined by the values passed inside this static factory method
    • toJson

      public final String toJson()
      This takes the currently defined values found inside this instance and converts it to a json string.
      返回:
      a Json string which represents this WalkingOptions object
    • toBuilder

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

      public static com.google.gson.TypeAdapter<WalkingOptions> 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
    • builder

      public static WalkingOptions.Builder builder()
      Build a new WalkingOptions object with no defaults.
      返回:
      a WalkingOptions.Builder object for creating a WalkingOptions object