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.
RoadObject.ObjectType.tunnel
) from the electronic horizon and the active route, they will not have the same IDs.Declaration
Swift
public let identifier: RoadObject.Identifier
-
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: RoadObject.Location
-
Kind of the road object with metadata.
Declaration
Swift
public let kind: RoadObject.Kind
-
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: RoadObject.Identifier, length: CLLocationDistance?, location: RoadObject.Location, kind: RoadObject.Kind)
-
Represents location of road object on road graph.
A point object is represented by a single edge whose location has the same
See morefractionFromStart
andfractionToEnd
.Declaration
Swift
public struct EdgeLocation
-
Type of the road object.
See moreDeclaration
Swift
public enum Kind
-
The location of a road object in the road graph.
See moreDeclaration
Swift
public enum Location
-
Contains information about position of the point on the graph and it’s geo-position.
See moreDeclaration
Swift
public struct Position
-
Identifies a road object in an electronic horizon. A road object represents a notable transition point along a road, such as a toll booth or tunnel entrance. A road object is similar to a
RouteAlert
but is more closely associated with the routing graph managed by theRoadGraph
class.Use a
RoadObjectStore
object to get more information about a road object with a given identifier or get the locations of road objects alongRoadGraph.Edge
s.Declaration
Swift
public typealias Identifier = String