StreetElement
public struct StreetElement : HorizonElement
Describes a street on the horizon element.
This structure holds a horizon element with information regarding street. It contains information regarding street name/number and city name/block it belongs to.
To obtain StreetElement
horizon elements, the integrator must create an instance of HorizonEngine
,
register HorizonOptions
including elementTypes
containing HorizonElementType
.streetType
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
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 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 district. Empty string if no city district is assigned to the part of the path.
Declaration
Swift
public let cityDistrict: String
-
City block. Empty string if no city block is assigned to the part of the path.
Declaration
Swift
public let cityBlock: String
-
Street name. Empty string if no street is assigned to the part of the path.
Declaration
Swift
public let name: String
-
Road numbers ordered by priority, from the highest to the lowest. Empty list if no road numbers are assigned to the part of the path.
Declaration
Swift
public let roadNumbers: [String]
-
Neighborhood name. Empty string if no neighborhood is assigned to the part of the path.
Declaration
Swift
public let neighborhood: String