StreetElement
public struct StreetElement : HorizonElement
HorizonElement
that contains data about a street.
To receive such elements in the HorizonSnapshot
, specify HorizonElementType
.streetType
in the HorizonOptions
that you register with the HorizonEngine
:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.streetType],
...
)
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes instance of
StreetElement
.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, cityDistrict: String, cityBlock: String, name: String, roadNumbers: [String], neighborhood: 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
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 district. Empty string if not available.
Declaration
Swift
public let cityDistrict: String
-
City block. Empty string if not available.
Declaration
Swift
public let cityBlock: String
-
Street name. Empty string if not available.
Declaration
Swift
public let name: String
-
Road numbers ordered by priority, from the highest to the lowest. Empty list if not available.
Declaration
Swift
public let roadNumbers: [String]
-
Neighborhood name. Empty string if not available.
Declaration
Swift
public let neighborhood: String