类 LegStep
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.LegStep
- 所有已实现的接口:
Serializable
Includes one
StepManeuver object and travel to the following LegStep.- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static classThis builder can be used to set the values describing theLegStep.static @interfaceSpeed limit sign. -
字段概要
字段修饰符和类型字段说明static final StringLegStep.SpeedLimitSignaccident.static final StringLegStep.SpeedLimitSigncongestion. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract List<BannerInstructions>If in your request you set NbmapDirections.Builder#bannerInstructions() to true, you'll receive a list ofBannerInstructionswhich encompasses all information necessary for creating a visual cue about a givenLegStep.static LegStep.Builderbuilder()Create a new instance of this class by using theLegStep.Builderclass.abstract StringString with the destinations of the way along which the travel proceeds.abstract doubledistance()The distance traveled from the maneuver to the nextLegStep.abstract StringThe legal driving side at the location for this step.abstract doubleduration()The estimated travel time from the maneuver to the nextLegStep.abstract DoubleThe typical travel time for traversing this LegStep.abstract Stringexits()String with the exit numbers or names of the way.static LegStepCreate a new instance of this class by passing in a formatted valid JSON String.abstract Stringgeometry()Gives the geometry of the leg step.abstract List<StepIntersection>Provides a list of all the intersections connected to the current way the user is traveling along.abstract StepManeuvermaneuver()AStepManeuverobject that typically represents the first coordinate making up thegeometry().abstract Stringmode()indicates the mode of transportation in the step.abstract Stringname()String with the name of the way along which the travel proceeds.abstract StringThe pronunciation hint of the way name.abstract Stringref()Any road designations associated with the road or path leading from this step's maneuver to the next step's maneuver.abstract StringAn optional string indicating the name of the rotary.abstract StringAn optional string indicating the pronunciation of the name of the rotary.abstract StringSpeed limit sign type.abstract StringSpeed limit unit as per the locale.abstract LegStep.BuilderConvert the currentLegStepto its builder holding the currently assigned values.static com.google.gson.TypeAdapter<LegStep>typeAdapter(com.google.gson.Gson gson) Gson type adapter for parsing Gson to this class.abstract List<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.abstract doubleweight()Specifies a decimal precision of edge weights, default value 1.从类继承的方法 ai.nextbillion.kits.directions.models.DirectionsJsonObject
toJson
-
字段详细资料
-
MUTCD
LegStep.SpeedLimitSignaccident.- 另请参阅:
-
VIENNA
LegStep.SpeedLimitSigncongestion.- 另请参阅:
-
-
构造器详细资料
-
LegStep
public LegStep()
-
-
方法详细资料
-
builder
Create a new instance of this class by using theLegStep.Builderclass.- 返回:
- this classes
LegStep.Builderfor creating a new instance
-
distance
public abstract double distance()The distance traveled from the maneuver to the nextLegStep.- 返回:
- a double number with unit meters
-
duration
public abstract double duration()The estimated travel time from the maneuver to the nextLegStep.- 返回:
- a double number with unit seconds
-
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
Speed limit unit as per the locale.- 返回:
- unit of the speed limit
-
speedLimitSign
Speed limit sign type.- 另请参阅:
-
geometry
Gives the geometry of the leg step.- 返回:
- an encoded polyline string
-
name
String with the name of the way along which the travel proceeds.- 返回:
- a
Stringrepresenting the way along which the travel proceeds
-
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
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
indicates the mode of transportation in the step.- 返回:
- String indicating the mode of transportation.
-
pronunciation
The pronunciation hint of the way name. Will be undefined if no pronunciation is hit.- 返回:
- String with the pronunciation
-
rotaryName
An optional string indicating the name of the rotary. This will only be a nonnull when the maneuver type equalsrotary.- 返回:
- String with the rotary name
-
rotaryPronunciation
An optional string indicating the pronunciation of the name of the rotary. This will only be a nonnull when the maneuver type equalsrotary.- 返回:
- String in IPA with the rotary name's pronunciation.
-
maneuver
AStepManeuverobject that typically represents the first coordinate making up thegeometry().- 返回:
- new
StepManeuverobject
-
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
If in your request you set NbmapDirections.Builder#bannerInstructions() to true, you'll receive a list ofBannerInstructionswhich encompasses all information necessary for creating a visual cue about a givenLegStep.- 返回:
- a list of
BannerInstructionss which help display visual cues inside your application
-
drivingSide
The legal driving side at the location for this step. Result will either beleftorright.- 返回:
- 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
Provides a list of all the intersections connected to the current way the user is traveling along.- 返回:
- list of
StepIntersectionrepresenting all intersections along the step
-
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
Convert the currentLegStepto 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 modifiedLegStep.- 返回:
- a
LegStep.Builderwith the same values set to match the ones defined in thisLegStep
-
typeAdapter
Gson type adapter for parsing Gson to this class.- 参数:
gson- the builtGsonobject- 返回:
- the type adapter for this class
-
fromJson
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
-