pingzing / trippit

An experimental Windows 10 Helsinki DigiTransit client
MIT License
1 stars 1 forks source link

[Bugfix] Fix missing the final node when drawing routes on map #52

Open pingzing opened 6 years ago

pingzing commented 6 years ago

All the paths drawn on the map for directions are missing their final node, so the legs often don't sync up. I think this is because we draw from the last node to the previous, but I think we might now draw from the new-first to the previous-last when switching to a new leg.

Additionally, I think the very final location doesn't get sent along with the list of nodes, so it never gets drawn at all.

pingzing commented 6 years ago

Partially addressed.

It looks like the root cause is more like HSLs servers give us legs where Leg N+1's start point doesn't necessarily match up with Leg N's end point.

This first half-fix addresses the issue by extending Walk legs to the end of the previous leg, and the beginning of the next leg.

We could do the same thing for vehicle-based legs, but man, it would look silly.