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],
    ...
)
  • 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
  • id

    Identifier of this element.

    Declaration

    Swift

    public let id: Int
  • 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>
  • End offset on the HorizonPath.

    Declaration

    Swift

    public let endOffset: Measurement<UnitLength>
  • City name.

    Declaration

    Swift

    public let name: String