类 LegStep.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.LegStep.Builder
- 封闭类:
- LegStep
This builder can be used to set the values describing the
LegStep.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract LegStep.BuilderbannerInstructions(List<BannerInstructions> 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.abstract LegStepbuild()Build a newLegStepobject.abstract LegStep.Builderdestinations(String destinations) String with the destinations of the way along which the travel proceeds.abstract LegStep.Builderdistance(double distance) The distance traveled from the maneuver to the nextLegStep.abstract LegStep.BuilderdrivingSide(String drivingSide) The legal driving side at the location for this step.abstract LegStep.Builderduration(double duration) The estimated travel time from the maneuver to the nextLegStep.abstract LegStep.BuilderdurationTypical(Double durationTypical) The typical travel time for traversing this LegStep.abstract LegStep.BuilderString with the exit numbers or names of the way.abstract LegStep.BuilderGives the geometry of the leg step.abstract LegStep.Builderintersections(List<StepIntersection> intersections) Provide a list of all the intersections connected to the current way the user is traveling along.abstract LegStep.Buildermaneuver(StepManeuver maneuver) AStepManeuverobject that typically represents the first coordinate making up theLegStep.geometry().abstract LegStep.BuilderIndicates the mode of transportation in the step.abstract LegStep.BuilderString with the name of the way along which the travel proceeds.abstract LegStep.Builderpronunciation(String pronunciation) The pronunciation hint of the way name.abstract LegStep.BuilderString with reference number or code of the way along which the travel proceeds.abstract LegStep.BuilderrotaryName(String rotaryName) An optional string indicating the name of the rotary.abstract LegStep.BuilderrotaryPronunciation(String rotaryPronunciation) An optional string indicating the pronunciation of the name of the rotary.abstract LegStep.BuilderspeedLimitSign(String speedLimitSign) Speed limit sign type.abstract LegStep.BuilderspeedLimitUnit(String speedLimitUnit) Speed limit unit as per the locale.abstract LegStep.BuildervoiceInstructions(List<VoiceInstructions> 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 LegStep.Builderweight(double weight) Specifies a decimal precision of edge weights, default value 1.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
distance
The distance traveled from the maneuver to the nextLegStep.- 参数:
distance- a double number with unit meters- 返回:
- this builder for chaining options together
-
duration
The estimated travel time from the maneuver to the nextLegStep.- 参数:
duration- a double number with unit seconds- 返回:
- this builder for chaining options together
-
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).- 参数:
durationTypical- a double number with unit seconds- 返回:
- this builder for chaining options together
-
speedLimitUnit
Speed limit unit as per the locale.- 参数:
speedLimitUnit- speed limit unit- 返回:
- this builder for chaining options together
- 另请参阅:
-
speedLimitSign
Speed limit sign type.- 参数:
speedLimitSign- speed limit sign- 返回:
- this builder for chaining options together
- 另请参阅:
-
geometry
Gives the geometry of the leg step.- 参数:
geometry- an encoded polyline string- 返回:
- this builder for chaining options together
-
name
String with the name of the way along which the travel proceeds.- 参数:
name- aStringrepresenting the way along which the travel proceeds- 返回:
- this builder for chaining options together
-
ref
String with reference number or code of the way along which the travel proceeds.- 参数:
ref- String with reference number or code of the way along which the travel proceeds. Optionally included, if data is available- 返回:
- this builder for chaining options together
-
destinations
String with the destinations of the way along which the travel proceeds.- 参数:
destinations- String with the destinations of the way along which the travel proceeds. Optionally included, if data is available- 返回:
- this builder for chaining options together
-
mode
Indicates the mode of transportation in the step.- 参数:
mode- String indicating the mode of transportation- 返回:
- this builder for chaining options together
-
pronunciation
The pronunciation hint of the way name. Will be undefined if no pronunciation is hit.- 参数:
pronunciation- String with the pronunciation- 返回:
- this builder for chaining options together
-
rotaryName
An optional string indicating the name of the rotary. This will only be a nonnull when the maneuver type equalsrotary.- 参数:
rotaryName- String with the rotary name- 返回:
- this builder for chaining options together
-
rotaryPronunciation
An optional string indicating the pronunciation of the name of the rotary. This will only be a nonnull when the maneuver type equalsrotary.- 参数:
rotaryPronunciation- String in IPA with the rotary name's pronunciation.- 返回:
- this builder for chaining options together
-
maneuver
AStepManeuverobject that typically represents the first coordinate making up theLegStep.geometry().- 参数:
maneuver- newStepManeuverobject- 返回:
- this builder for chaining options together
-
voiceInstructions
public abstract LegStep.Builder voiceInstructions(@NonNull List<VoiceInstructions> 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.- 参数:
voiceInstructions- a list of voice instructions which can be triggered on this current step- 返回:
- this builder for chaining options together
-
bannerInstructions
public abstract LegStep.Builder bannerInstructions(@NonNull List<BannerInstructions> 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.- 参数:
bannerInstructions- a list ofBannerInstructionss which help display visual cues inside your application- 返回:
- this builder for chaining options together
-
drivingSide
The legal driving side at the location for this step. Result will either beleftorright.- 参数:
drivingSide- a string with either a left or right value- 返回:
- this builder for chaining options together
-
weight
Specifies a decimal precision of edge weights, default value 1.- 参数:
weight- a decimal precision double value- 返回:
- this builder for chaining options together
-
intersections
Provide a list of all the intersections connected to the current way the user is traveling along.- 参数:
intersections- list ofStepIntersectionrepresenting all intersections along the step- 返回:
- this builder for chaining options together
-
exits
String with the exit numbers or names of the way. Optionally included, if data is available.- 参数:
exits- a String identifying the exit number or name- 返回:
- this builder for chaining options together
-
build
Build a newLegStepobject.- 返回:
- a new
LegStepusing the provided values in this builder
-