This pull request continues the changes made in #51.
Changes:
Rebased to the current main branch (and solved conflicts)
I removed the fixed stepScale and added a logic that scales each step differently based on its nodes (but they will mostly be the same size, keep reading).
I changed the calculation logic of "the centroid". The average was working poorly when e.g. we have three points - two to the right and one to the left. Centroid was much to the right point to the point the left one was getting off the screen. The new calculation just finds a rect of min/max coordinates and picks the middle as a centroid.
MapNavigatorImpl (more precisely, splitNavigationPathIntoSteps function) ensures that each step can fit within defined bounds (max width and max height). It will try to maximize the number of nodes in each step, making most of the steps nearly equal to the max dimensions.
This pull request continues the changes made in #51.
Changes:
stepScale
and added a logic that scales each step differently based on its nodes (but they will mostly be the same size, keep reading).