This is a likely fix of issue #27, which works in my test case, OpenTrailView (https://opentrailview.org) which uses GeoJSON Path Finder to connect together panoramas using GeoJSON OpenStreetMap data.
The issue appears to be when a phantom node is created for the end point of a route. The compactedCoordinates from the previous 'real' node (the neighbor) to the phantom node should contain the previous 'real' node, and not the phantom node - but in fact contain the reverse.
This happens because the incomingCoordinates of the phantom from the neighbor contain the phantom, but not the neighbor.
So the fix creates the compactedCoordinates by obtaining the neighbor coordinates (the exact unrounded coordinates of the neighbor are obtained) and concatenating the incomingCoordinates with the last member (the phantom coordinates) removed.
This is a likely fix of issue #27, which works in my test case, OpenTrailView (https://opentrailview.org) which uses GeoJSON Path Finder to connect together panoramas using GeoJSON OpenStreetMap data.
The issue appears to be when a phantom node is created for the end point of a route. The compactedCoordinates from the previous 'real' node (the neighbor) to the phantom node should contain the previous 'real' node, and not the phantom node - but in fact contain the reverse.
This happens because the incomingCoordinates of the phantom from the neighbor contain the phantom, but not the neighbor.
So the fix creates the compactedCoordinates by obtaining the neighbor coordinates (the exact unrounded coordinates of the neighbor are obtained) and concatenating the incomingCoordinates with the last member (the phantom coordinates) removed.