Class RoadShieldIconProperties
Contains the information required to create a road shield image.
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.Will be removed in v4.29.0.The country code in ISO-3166-1 alpha-3 format, which will determine the type of road shield.A string that is used to additionally determine the road shield's visual representation.The type of route indicating the significance of the road in a range from 0 to 6.The text of the road-shield.The state code for the road. -
Constructor Summary
ConstructorsConstructorDescriptionRoadShieldIconProperties(RouteType routeType, CountryCode isoCountryCode, String stateCode, String routeNumberName, String shieldText) Construct RoadShieldIconProperties instance with isoCountryCode.RoadShieldIconProperties(RouteType routeType, String countryCode, String stateCode, String routeNumberName, String shieldText) Deprecated.Will be removed in v4.29.0. -
Method Summary
-
Field Details
-
routeType
The type of route indicating the significance of the road in a range from 0 to 6. A value of 1 stands for the most major route and 6 the most minor, with 0 being of unknown type.
-
countryCode
Deprecated.Will be removed in v4.29.0. Use
isoCountryCodeinstead.The country code in ISO-3166-1 alpha-3 format, which will determine the type of road shield.
-
isoCountryCode
The country code in ISO-3166-1 alpha-3 format, which will determine the type of road shield. (Preferred)
-
stateCode
The state code for the road. It's a 2-letter code in ISO 3166-2 format. For example the ones listed for US on this page https://en.wikipedia.org/wiki/ISO_3166-2:US. The code "AL" is for Alabama. Another example is the code for autonomous communities listed on https://en.wikipedia.org/wiki/ISO_3166-2:ES. Can be empty if not required for the particular country.
-
routeNumberName
A string that is used to additionally determine the road shield's visual representation. In a routing context, the text can be taken from a
LocalizedRoadNumber, which is available for eachSpanof aRouteobject. Typically, the string contains the number of a road, such as "E100". Internally, the text is parsed with a RegEx pattern and the results will be used along with other properties such asrouteType,countryCodeandstateCodeto identify the visual representation of a road shield icon.Note that the actual text which will be displayed on the road shield icon is set with
shieldText. In order to determine the visuals of the icon,countryCode,routeTypeand eventually thestateCodeis in most cases sufficient to determine the type of road shield. In this case an empty string should be passed.Note: Texts that contain a
CardinalDirectionare currently not supported and may lead to unexpected results. SeeLocalizedRoadNumberfor more details, it provides texts with and without a cardinal direction. -
shieldText
The text of the road-shield. This is the text which is displayed on the road-shield in reality. It will be in the output road-shield icon.
-
-
Constructor Details
-
RoadShieldIconProperties
@Deprecated public RoadShieldIconProperties(@NonNull RouteType routeType, @Deprecated @NonNull String countryCode, @NonNull String stateCode, @NonNull String routeNumberName, @NonNull String shieldText) Deprecated.Will be removed in v4.29.0. Use constructor with
isoCountryCodeinstead.Construct RoadShieldIconProperties instance.
- Parameters:
routeType-The type of route indicating the significance of the road in a range from 0 to 6. A value of 1 stands for the most major route and 6 the most minor, with 0 being of unknown type.
countryCode-The country code in ISO-3166-1 alpha-3 format, which will determine the type of road shield.
stateCode-The state code for the road. It's a 2-letter code in ISO 3166-2 format. For example the ones listed for US on this page https://en.wikipedia.org/wiki/ISO_3166-2:US. The code "AL" is for Alabama. Another example is the code for autonomous communities listed on https://en.wikipedia.org/wiki/ISO_3166-2:ES. Can be empty if not required for the particular country.
routeNumberName-A string that is used to additionally determine the road shield's visual representation. In a routing context, the text can be taken from a
LocalizedRoadNumber, which is available for eachSpanof aRouteobject. Typically, the string contains the number of a road, such as "E100". Internally, the text is parsed with a RegEx pattern and the results will be used along with other properties such asrouteType,countryCodeandstateCodeto identify the visual representation of a road shield icon.Note that the actual text which will be displayed on the road shield icon is set with
shieldText. In order to determine the visuals of the icon,countryCode,routeTypeand eventually thestateCodeis in most cases sufficient to determine the type of road shield. In this case an empty string should be passed.Note: Texts that contain a
CardinalDirectionare currently not supported and may lead to unexpected results. SeeLocalizedRoadNumberfor more details, it provides texts with and without a cardinal direction.shieldText-The text of the road-shield. This is the text which is displayed on the road-shield in reality. It will be in the output road-shield icon.
-
RoadShieldIconProperties
public RoadShieldIconProperties(@NonNull RouteType routeType, @Nullable CountryCode isoCountryCode, @NonNull String stateCode, @NonNull String routeNumberName, @NonNull String shieldText) Construct RoadShieldIconProperties instance with isoCountryCode.
- Parameters:
routeType-The type of route indicating the significance of the road in a range from 0 to 6. A value of 1 stands for the most major route and 6 the most minor, with 0 being of unknown type.
isoCountryCode-The country code in ISO-3166-1 alpha-3 format, which will determine the type of road shield. (Preferred)
stateCode-The state code for the road. It's a 2-letter code in ISO 3166-2 format. For example the ones listed for US on this page https://en.wikipedia.org/wiki/ISO_3166-2:US. The code "AL" is for Alabama. Another example is the code for autonomous communities listed on https://en.wikipedia.org/wiki/ISO_3166-2:ES. Can be empty if not required for the particular country.
routeNumberName-A string that is used to additionally determine the road shield's visual representation. In a routing context, the text can be taken from a
LocalizedRoadNumber, which is available for eachSpanof aRouteobject. Typically, the string contains the number of a road, such as "E100". Internally, the text is parsed with a RegEx pattern and the results will be used along with other properties such asrouteType,countryCodeandstateCodeto identify the visual representation of a road shield icon.Note that the actual text which will be displayed on the road shield icon is set with
shieldText. In order to determine the visuals of the icon,countryCode,routeTypeand eventually thestateCodeis in most cases sufficient to determine the type of road shield. In this case an empty string should be passed.Note: Texts that contain a
CardinalDirectionare currently not supported and may lead to unexpected results. SeeLocalizedRoadNumberfor more details, it provides texts with and without a cardinal direction.shieldText-The text of the road-shield. This is the text which is displayed on the road-shield in reality. It will be in the output road-shield icon.
-