RoadGraph

public final class RoadGraph

RoadGraph provides methods to get edge shape (e.g. RoadGraph.Edge) and metadata.

You do not create a RoadGraph object manually. Instead, observe the Notification.Name.electronicHorizonDidUpdatePosition notification to obtain edge identifiers and get more details about the edges using the RouteController.roadGraph or PassiveLocationDataSource.roadGraph property.

  • Returns metadata about the edge with the given edge identifier.

    Declaration

    Swift

    public func edgeMetadata(edgeIdentifier: Edge.Identifier) -> Edge.Metadata?

    Return Value

    Metadata about the edge with the given edge identifier, or nil if the edge is inaccessible.

  • Returns a line string geometry corresponding to the given edge identifier.

    Declaration

    Swift

    public func edgeShape(edgeIdentifier: Edge.Identifier) -> LineString?

    Return Value

    A line string corresponding to the given edge identifier, or nil if the edge is inaccessible.