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],
...
)
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(id:pathID: startOffset: endOffset: countryCode: regionCode: drivingSide: speedUnit: regionalSpeedLimits: ) Initializes instance of
CountryInformationElement.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, countryCode: String, regionCode: String, drivingSide: DrivingSide, speedUnit: UnitSpeed, regionalSpeedLimits: [RegionalSpeedLimit] )
-
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
HorizonPathto 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”, “NLD”. See ISO-3166-1 alpha 3 code for more details.
Declaration
Swift
public let countryCode: String -
ISO 3166-2 state/province/region code. For example: “US-TX”, “NL-ZE”.
Declaration
Swift
public let regionCode: String -
TomTomSDKCommon/DrivingSideof the country.Declaration
Swift
public let drivingSide: DrivingSide -
Speed unit used in the country.
Declaration
Swift
public let speedUnit: UnitSpeed -
RegionalSpeedLimitdefined for this region/state/country.Declaration
Swift
public let regionalSpeedLimits: [RegionalSpeedLimit]
CountryInformationElement Structure Reference