City

public struct City : HorizonElement

Describes a city on the horizon element.

This class holds a horizon element with information regarding city. In case of this class, information consists only of the name of the city.

To obtain City 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.

Lifecycle

  • Initializes instance of City.

    Declaration

    Swift

    public init(id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, name: String)

Public

  • Declaration

    Swift

    public let elementType: HorizonElementType
  • id

    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>
  • City name.

    Declaration

    Swift

    public let name: String