类 BannerComponents.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.BannerComponents.Builder
- 封闭类:
- BannerComponents
This builder can be used to set the values describing the
BannerComponents.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract BannerComponents.Builderabbreviation(String abbreviation) The abbreviated form of text.abstract BannerComponents.BuilderabbreviationPriority(Integer abbreviationPriority) An integer indicating the order in which the abbreviation abbr should be used in place of text.abstract BannerComponents.BuilderA boolean telling you if that lane can be used to complete the upcoming maneuver.abstract BannerComponentsbuild()Build a newBannerComponentsobject.abstract BannerComponents.BuildercountryCode(String countryCode) A string telling you of the local country codeabstract BannerComponents.Builderdirections(List<String> directions) A List of directions indicating which way you can go from a lane (left, right, or straight).abstract BannerComponents.BuilderimageBaseUrl(String imageBaseUrl) In some cases when theLegStepis a highway or major roadway, there might be a shield icon that's included to better identify to your user to roadway.abstract BannerComponents.BuilderIn some cases when theStepManeuverwill be difficult to navigate, an image can describe how to proceed.abstract BannerComponents.BuilderA string telling you if there have a shield on the road It will be wrapped in a image and combine with the text and showing in the instructionabstract BannerComponents.BuilderString giving you more context aboutBannerComponents.BannerComponentsTypewhich may help in visual markup/display choices.abstract BannerComponents.BuilderA snippet of the fullBannerText.text()which can be used for visually altering parts of the full string.abstract BannerComponents.BuilderString giving you more context about the component which may help in visual markup/display choices.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
text
A snippet of the fullBannerText.text()which can be used for visually altering parts of the full string.- 参数:
text- a single snippet of the full text instruction- 返回:
- this builder for chaining options together
-
type
String giving you more context about the component which may help in visual markup/display choices. If the type of the components is unknown it should be treated as text.Possible values:
- text (default): indicates the text is part of the instructions and no other type
- icon: this is text that can be replaced by an icon, see imageBaseURL
- delimiter: this is text that can be dropped and should be dropped if you are rendering icons
- exit-number: the exit number for the maneuver
- exit: the word for exit in the local language
- 参数:
type- String type from above list- 返回:
- this builder for chaining options together
-
subType
String giving you more context aboutBannerComponents.BannerComponentsTypewhich may help in visual markup/display choices.Possible values:
- jct: indicates a junction guidance view.
- signboard: indicates a signboard guidance view.
- 参数:
subType- String subType from above list- 返回:
- String type from above list
-
abbreviation
The abbreviated form of text.- 参数:
abbreviation- for the given text of this component- 返回:
- this builder for chaining options together
-
abbreviationPriority
public abstract BannerComponents.Builder abbreviationPriority(@Nullable Integer abbreviationPriority) An integer indicating the order in which the abbreviation abbr should be used in place of text. The highest priority is 0 and a higher integer value indicates a lower priority. There are no gaps in integer values.Multiple components can have the same abbreviationPriority and when this happens all components with the same abbr_priority should be abbreviated at the same time. Finding no larger values of abbreviationPriority indicates that the string is fully abbreviated.
- 参数:
abbreviationPriority- Integer indicating the order of the abbreviation- 返回:
- this builder for chaining options together
-
imageBaseUrl
In some cases when theLegStepis a highway or major roadway, there might be a shield icon that's included to better identify to your user to roadway. Note that this doesn't return the image itself but rather the url which can be used to download the file.- 参数:
imageBaseUrl- the url which can be used to download the shield icon if one is avaliable- 返回:
- this builder for chaining options together
-
imageUrl
In some cases when theStepManeuverwill be difficult to navigate, an image can describe how to proceed. The domain name for this image is a Junction View. Unlike the imageBaseUrl, this image url does not include image density encodings.- 参数:
imageUrl- the url which can be used to download the image- 返回:
- this builder for chaining options together
-
directions
A List of directions indicating which way you can go from a lane (left, right, or straight). If the value is ['left', 'straight'], the driver can go straight or left from that lane. Present if this is a lane component.- 参数:
directions- List of allowed directions from that lane- 返回:
- this builder for chaining options together
-
active
A boolean telling you if that lane can be used to complete the upcoming maneuver. If multiple lanes are active, then they can all be used to complete the upcoming maneuver. Present if this is a lane component.- 参数:
activeState- true, if the lane could be used for upcoming maneuver, false - otherwise- 返回:
- this builder for chaining options together
-
reference
A string telling you if there have a shield on the road It will be wrapped in a image and combine with the text and showing in the instruction- 参数:
reference-- 返回:
- this builder for chaining options together
-
countryCode
A string telling you of the local country code- 参数:
countryCode-- 返回:
- this builder for chaining options together
-
build
Build a newBannerComponentsobject.- 返回:
- a new
BannerComponentsusing the provided values in this builder
-