Link to relevant issues in comment

This commit is contained in:
Bryan Housel
2018-04-18 23:46:39 -04:00
parent 00e5e8efa0
commit 42472b129a

View File

@@ -140,9 +140,9 @@ export function osmJoinWays(toJoin, graph) {
// (for member ordering only, not way ordering - see #4872)
// Strongly prefer to generate a forward path that preserves the order
// of the members array. For multipolygons and most relations, member
// order does not matter - but for routes, it does. If we started this
// sequence backwards (i.e. next member way attaches to the start node
// and not the end node), reverse the initial way before continuing.
// order does not matter - but for routes, it does. (see #4859)
// If we started this sequence backwards (i.e. next member way attaches to
// the start node and not the end node), reverse the initial way before continuing.
if (joinAsMembers && currWays.length === 1 && nodes[0] !== end && nodes[nodes.length - 1] !== end &&
(nodes[nodes.length - 1] === start || nodes[0] === start)
) {