RoadShield
public struct RoadShield : Equatable
Represents a road shield, a sign used to indicate the route number and the road’s classification.
Additional shield text, such as “N”, “Bus” (for “Business”), “Bus Loop” (for “Business Loop”).
Declaration
Swift
public let affixes: [String]
The country code (ISO 3166-1 alpha-3) of the country where the shield is located.
Declaration
Swift
public let countryCode: String
The full road number. Most road numbers have a ‘letter’ prefix, which is also returned. For example, a call for the German motorway returns “A40” rather than “40”.
Declaration
Swift
public let fullRoadNumber: String
Creates an instance with the specified parameters.
Throws
An error of the typeInitializationError
.
Declaration
Swift
public init(
fullRoadNumber: String,
shieldContent: String = "",
affixes: [String] = [],
stateCode: String = "",
countryCode: String = "",
reference: String = ""
) throws
Parameters
fullRoadNumber
|
Full road number. Most road numbers have a ‘letter’ prefix, which is also included. For example, a call for the German motorway returns “A40” rather than “40”. |
shieldContent
|
The road number as shown on the shield. |
affixes
|
List of possible affixes that can be shown in addition to the |
stateCode
|
The state code of the state where the shield is located (the second part of an ISO 3166-2 identifier). |
countryCode
|
The country code (ISO 3166-1 alpha-3) of the country where the shield is located. |
reference
|
Transparent identifier of the shield for use with the TomTom RoadShield API (see “Routing with Extended Guidance”). May be empty if the underlying data source does not support the mapping. |
Errors that can be thrown during the creation of RoadShield
.
Declaration
Swift
public enum InitializationError : Error
Transparent identifier of the shield for use with the TomTom RoadShield API May be empty if the underlying data source does not support the mapping.
Declaration
Swift
public let reference: String
The road number as shown on the shield. For example, a call for the German motorway returns “40” rather than “A40”.
Declaration
Swift
public let shieldContent: String
The state code of the state the shield is in (second part of an ISO 3166-2 identifier).
Declaration
Swift
public let stateCode: String