CityElement
public struct CityElement : HorizonElement
HorizonElement
that contains data about a city.
To receive such elements in the horizon snapshot HorizonSnapshot
, specify HorizonElementType
.cityType
in the HorizonOptions
that you register with the HorizonEngine
:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.cityType],
...
)
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType
End offset on the HorizonPath
.
Declaration
Swift
public let endOffset: Measurement<UnitLength>
Identifier of this element.
Declaration
Swift
public let id: Int
Initializes instance of CityElement
.
Declaration
Swift
public init(id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, name: String)
City name.
Declaration
Swift
public let name: String
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>