CountryInformationElement
public struct CountryInformationElement : HorizonElement
HorizonElement
that contains data about a country.
To receive such elements in the HorizonSnapshot
, specify HorizonElementType
.countryInformationType in the
HorizonOptions
that you register with the HorizonEngine
:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.countryInformationType],
...
)
-
init(id:
pathID: startOffset: endOffset: countryCodeISO3: regionCode: drivingSide: speedUnit: regionalSpeedLimits: countryName: regionName: ) Initializes instance of
CountryInformationElement
.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, countryCodeISO3: String, regionCode: String, drivingSide: DrivingSide, speedUnit: UnitSpeed, regionalSpeedLimits: [RegionalSpeedLimit], countryName: String, regionName: String )
-
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType
-
Identifier of this element.
Declaration
Swift
public let id: Int
-
Identifier of the
HorizonPath
to which this element belongs.Declaration
Swift
public let pathID: Int
-
Start offset on the
HorizonPath
.Declaration
Swift
public let startOffset: Measurement<UnitLength>
-
End offset on the
HorizonPath
.Declaration
Swift
public let endOffset: Measurement<UnitLength>
-
ISO 3166-1 alpha-3 country code. For example: “USA” for the United States of America, or “NLD” for the Netherlands. Empty string if not available. See ISO-3166-1 alpha 3 code for more details.
Declaration
Swift
public let countryCodeISO3: String
-
Two-letter code for the first-level subdivision of a country that can be used in combination with the ISO 3166-1 alpha-2 country code to form the ISO 3166-2 code of the subdivision. For example: “ON” (ISO 3166-2: “CA-ON”) for Ontario, or “ZE” (ISO 3166-2: “NL-ZE”) for Zeeland. Empty string if not available. See ISO 3166-2 country subdivision code for more details.
Declaration
Swift
public let regionCode: String
-
TomTomSDKCommon/DrivingSide
of the country.Declaration
Swift
public let drivingSide: DrivingSide
-
Speed unit used in the country.
Declaration
Swift
public let speedUnit: UnitSpeed
-
RegionalSpeedLimit
defined for this region/state/country.Declaration
Swift
public let regionalSpeedLimits: [RegionalSpeedLimit]
-
Name of the country in the language of the current locale, as specified in
TomTomSDKNavigationEngines/NavigationSnapshot/locale
. Empty string if not available.Declaration
Swift
public let countryName: String
-
Name of the region/state in the language of the current locale, as specified in
TomTomSDKNavigationEngines/NavigationSnapshot/locale
. Empty string if not available.Declaration
Swift
public let regionName: String