CityElement
public struct CityElement : HorizonElement
Describes a city on the horizon element.
This structure holds a horizon element with information regarding city. In case of this class, information consists only of the name of the city.
To obtain CityElement
horizon elements, the integrator must create an instance of HorizonEngine
,
register HorizonOptions
including elementTypes
containing HorizonElementType
.cityType
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
CityElement
.Declaration
Swift
public init(id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, name: 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 path where this element belongs.
Declaration
Swift
public let pathID: Int
-
Start offset on the path.
Declaration
Swift
public let startOffset: Measurement<UnitLength>
-
End offset on the path.
Declaration
Swift
public let endOffset: Measurement<UnitLength>
-
City name.
Declaration
Swift
public let name: String