RegionElement
public struct RegionElement : HorizonElement
HorizonElement that contains data about a region.
To receive such elements in the HorizonSnapshot, specify HorizonElementType.regionType
in the HorizonOptions that you register with the HorizonEngine:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.regionType],
...
)
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 )
-
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> -
Name of the country. Empty string if no country is assigned to the corresponding part of the path.
Declaration
Swift
public let country: String -
Name of the state/province/region. Empty string if no sub-country is assigned to the corresponding part of the path.
Declaration
Swift
public let subCountry: String
RegionElement Structure Reference