Region
public struct Region : HorizonElement
Describes a region on the horizon element.
This class holds a horizon element with information regarding region. It contains information regarding country and subcountry name. Subcountry name can contain either state, province or region name.
To obtain Region horizon elements, the integrator must create an instance of HorizonEngine,
register HorizonOptions including elementTypes containing HorizonElementType .regionType with a call to HorizonEngine .registerHorizonOptions,
and request a HorizonResult using the previously registered HorizonOptions with a call to
HorizonEngine .generateHorizon.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes instance of
Region.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, country: String, subCountry: String )
-
Declaration
Swift
public let elementType: HorizonElementType -
Declaration
Swift
public let id: Int -
Declaration
Swift
public let pathID: Int -
Declaration
Swift
public let startOffset: Measurement<UnitLength> -
Declaration
Swift
public let endOffset: Measurement<UnitLength> -
Country name. Empty string if no country is assigned to the part of the path.
Declaration
Swift
public let country: String -
State/province/region name. Empty string if no sub-country is assigned to the part of the path.
Declaration
Swift
public let subCountry: String
Region Structure Reference