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 PassiveLocationManager.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 not in the cache.

  • 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 not in the cache.

  • Returns a line string geometry corresponding to the given path.

    Declaration

    Swift

    public func shape(of path: Path) -> LineString?

    Return Value

    A line string corresponding to the given path, or nil if any of path edges are not in the cache.

  • Returns a point corresponding to the given position.

    Declaration

    Swift

    public func shape(of position: Position) -> Point?

    Return Value

    A point corresponding to the given position, or nil if the edge is not in the cache.