RoadObject
public struct RoadObject
Describes the object on the road. There are two sources of road objects: active route and the electronic horizon.
-
Identifier of the road object. If we get the same objects (e.g.
RoadObjectType.tunnel
) from the electronic horizon and the active route, they will not have the same IDs.Declaration
Swift
public let identifier: RoadObjectIdentifier
-
Length of the object,
nil
if the object is point-like.Declaration
Swift
public let length: CLLocationDistance?
-
Location of the road object.
Declaration
Swift
public let location: RoadObjectLocation
-
Type of the road object with metadata.
Declaration
Swift
public let type: RoadObjectType
-
true
if an object is added by user,false
if it comes from Mapbox service.Declaration
Swift
public let isUserDefined: Bool
-
Initializes a new
RoadObject
object.Declaration
Swift
public init(identifier: RoadObjectIdentifier, length: CLLocationDistance?, location: RoadObjectLocation, type: RoadObjectType)