RoadObjectMatcher
final public class RoadObjectMatcher
Provides methods for road object matching.
Matching results are delivered asynchronously via a delegate. In case of error (if there are no tiles in the cache, decoding failed, etc.) the object won’t be matched.
-
Road object matcher delegate.
Declaration
Swift
public weak var delegate: RoadObjectMatcherDelegate? { get set }
-
Matches given OpenLR object to the graph.
Declaration
Swift
public func matchOpenLR(location: String, standard: OpenLRStandard, identifier: RoadObjectIdentifier)
Parameters
location
OpenLR location of the road object, encoded in a base64 string.
standard
Standard used to encode OpenLR location.
identifier
Unique identifier of the object.
-
Matches given polyline to the graph. Polyline should define a valid path on the graph, i.e. it should be possible to drive this path according to traffic rules.
Declaration
Swift
public func match(polyline: LineString, identifier: RoadObjectIdentifier)
Parameters
polyline
Polyline representing the object.
identifier
Unique identifier of the object.
-
Matches a given polygon to the graph. “Matching” here means we try to find all intersections of the polygon with the road graph and track distances to those intersections as distance to the polygon.
Declaration
Swift
public func match(polygon: Polygon, identifier: RoadObjectIdentifier)
Parameters
polygon
Polygon representing the object.
identifier
Unique identifier of the object.
-
Matches given gantry (i.e. polyline orthogonal to the road) to the graph. “Matching” here means we try to find all intersections of the gantry with the road graph and track distances to those intersections as distance to the gantry.
Declaration
Swift
public func match(gantry: MultiPoint, identifier: RoadObjectIdentifier)
Parameters
gantry
Gantry representing the object.
identifier
Unique identifier of the object.
-
Matches given point to road graph.
Declaration
Swift
public func match(point: CLLocationCoordinate2D, identifier: RoadObjectIdentifier)
Parameters
point
Point representing the object.
identifier
Unique identifier of the object.
-
Cancel road object matching.
Declaration
Swift
public func cancel(identifier: RoadObjectIdentifier)
Parameters
identifier
Identifier for which matching should be canceled.