Use maxDistance passed in to osmIntersection() in turn search

(closes #4844)

The maxDistance was previously hardcoded to 30 meters.
Now we pass it in as a parameter when creating the intersection.
But we need to honor that same maxDistance later when walking the graph
to find turns from.
This commit is contained in:
Bryan Housel
2018-03-02 17:27:57 -05:00
parent ad032ab928
commit ecd63cdad2

View File

@@ -387,7 +387,6 @@ export function osmIntersection(graph, startVertexId, maxDistance) {
// maxViaWay=1 from-*-via-*-to (1 via max)
// maxViaWay=2 from-*-via-*-via-*-to (2 vias max)
var maxPathLength = (maxViaWay * 2) + 3;
var maxDistance = 30; // meters
var turns = [];
step(start);