类 StepManeuver

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

public abstract class StepManeuver extends DirectionsJsonObject
Gives maneuver information about one LegStep.
另请参阅:
  • 字段详细资料

    • TURN

      public static final String TURN
      A basic turn in the direction of the modifier.
      另请参阅:
    • NEW_NAME

      public static final String NEW_NAME
      The road name changes (after a mandatory turn).
      另请参阅:
    • DEPART

      public static final String DEPART
      Indicates departure from a leg. The modifier value indicates the position of the departure point in relation to the current direction of travel.
      另请参阅:
    • ARRIVE

      public static final String ARRIVE
      Indicates arrival to a destination of a leg. The modifier value indicates the position of the arrival point in relation to the current direction of travel.
      另请参阅:
    • MERGE

      public static final String MERGE
      Merge onto a street.
      另请参阅:
    • ON_RAMP

      public static final String ON_RAMP
      Take a ramp to enter a highway.
      另请参阅:
    • OFF_RAMP

      public static final String OFF_RAMP
      Take a ramp to exit a highway.
      另请参阅:
    • FORK

      public static final String FORK
      Take the left or right side of a fork.
      另请参阅:
    • END_OF_ROAD

      public static final String END_OF_ROAD
      Road ends in a T intersection.
      另请参阅:
    • CONTINUE

      public static final String CONTINUE
      Continue on a street after a turn.
      另请参阅:
    • ROUNDABOUT

      public static final String ROUNDABOUT
      Traverse roundabout. Has an additional property exit in the route step that contains the exit number. The modifier specifies the direction of entering the roundabout.
      另请参阅:
    • ROTARY

      public static final String ROTARY
      A traffic circle. While very similar to a larger version of a roundabout, it does not necessarily follow roundabout rules for right of way. It can offer LegStep.rotaryName() parameters, LegStep.rotaryPronunciation() ()} parameters, or both, in addition to the exit() property.
      另请参阅:
    • ROUNDABOUT_TURN

      public static final String ROUNDABOUT_TURN
      A small roundabout that is treated as an intersection.
      另请参阅:
    • NOTIFICATION

      public static final String NOTIFICATION
      Indicates a change of driving conditions, for example changing the mode from driving to ferry.
      另请参阅:
    • EXIT_ROUNDABOUT

      public static final String EXIT_ROUNDABOUT
      Indicates the exit maneuver from a roundabout. Will not appear in results unless you supply true to the exit() query parameter in the request.
      另请参阅:
    • EXIT_ROTARY

      public static final String EXIT_ROTARY
      Indicates the exit maneuver from a rotary. Will not appear in results unless you supply true to the NbmapDirections.Builder#roundaboutExits() query parameter in the request.
      另请参阅:
  • 构造器详细资料

    • StepManeuver

      public StepManeuver()
  • 方法详细资料

    • builder

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

      @NonNull public ai.nextbillion.kits.geojson.Point location()
      A Point representing this intersection location.
      返回:
      GeoJson Point representing this intersection location
    • rawLocation

      @NonNull @SerializedName("location") protected abstract double[] rawLocation()
      A Point representing this intersection location. Since the rawLocation isn't public, it's okay to be mutable as long as nothing in this SDK changes values.
      返回:
      GeoJson Point representing this intersection location
    • bearingBefore

      @Nullable @SerializedName("bearing_before") public abstract Double bearingBefore()
      Number between 0 and 360 indicating the clockwise angle from true north to the direction of travel right before the maneuver.
      返回:
      double with value from 0 to 360
    • bearingAfter

      @Nullable @SerializedName("bearing_after") public abstract Double bearingAfter()
      Number between 0 and 360 indicating the clockwise angle from true north to the direction of travel right after the maneuver.
      返回:
      double with value from 0 to 360
    • instruction

      @Nullable public abstract 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.
      返回:
      String with instruction
      另请参阅:
    • 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
    • muted

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

      @Nullable public abstract 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

      返回:
      an integer indicating number of the exit to take
    • toBuilder

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

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