MMKPolylineIndex

@interface MMKPolylineIndex : NSObject

Provides methods for binding locations to a polyline

Summary

Instance methods

- (nullable MMKPolylinePosition *)
    closestPolylinePositionWithPoint:(nonnull MMKPoint *)point
                            priority:(MMKPolylineIndexPriority)priority
                     maxLocationBias:(double)maxLocationBias;

Finds closest polyline position

- (nullable MMKPolylinePosition *)
    closestPolylinePositionWithPoint:(nonnull MMKPoint *)point
                        positionFrom:(nonnull MMKPolylinePosition *)positionFrom
                          positionTo:(nonnull MMKPolylinePosition *)positionTo
                     maxLocationBias:(double)maxLocationBias;

Finds the closest polyline position between the two positions

Instance methods

closestPolylinePositionWithPoint:priority:maxLocationBias:

- (nullable MMKPolylinePosition *)
    closestPolylinePositionWithPoint:(nonnull MMKPoint *)point
                            priority:(MMKPolylineIndexPriority)priority
                     maxLocationBias:(double)maxLocationBias;

Finds closest polyline position. Returns null if there is no position that satisfies the condition distance(point, position) < maxLocationBias.

Two modes are available: 1. Find the closest polyline position to a raw point MMKPolylineIndexPriorityClosestToRawPoint 2. Find the closest polyline position to the polyline start MMKPolylineIndexPriorityClosestToStart.


closestPolylinePositionWithPoint:positionFrom:positionTo:maxLocationBias:

- (nullable MMKPolylinePosition *)
    closestPolylinePositionWithPoint:(nonnull MMKPoint *)point
                        positionFrom:(nonnull MMKPolylinePosition *)positionFrom
                          positionTo:(nonnull MMKPolylinePosition *)positionTo
                     maxLocationBias:(double)maxLocationBias;

Finds the closest polyline position between the two positions. Returns null if there is no position that satisfies the condition distance(point, position) < maxLocationBias.