find Shortest Distance
fun findShortestDistance(startLocation: LngLatAlt, startWay: Way, endLocation: LngLatAlt?, endWay: Way?, endIntersection: Intersection?, debugFeatureCollection: FeatureCollection?, maxDistance: Double = Double.MAX_VALUE): ShortestDistanceResults
findShortestDistance gets the shortest distance between two points, or between one point and an intersection. The points have to already be associated with a nearest Way and temporary start and end locations are added as connected nodes in the graph.
Parameters
start Location
The location of the start point
start Way
The nearest matched Way to the start point
end Location
The location of the end point (not used if endIntersection is specified)
end Way
The nearest matched Way to the end point (not used if endIntersection is specified)
end Intersection
The intersection to end the search at
debug Feature Collection
A FeatureCollection used for debug only
max Distance
The maximum distance to search for