Fit route bounds including waypoints - #424
Open
M393 wants to merge 2 commits into
Open
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
If a marker is not directly on the route, it may have been offscreen after fitting. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
|
Hmpf let me fix the GHA preview workflow. I remember some sorcery to make forks work with our ssh secrets. If you're using this for your own purposes and will PR more often, I can also make you a writer to the repo @M393 ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👨💻 Changes proposed
Include the waypoint positions in the calculated bounds for the route.
If the waypoint is not directly on the route it may be off-screen otherwise.
If any x or y coordinate is exactly zero it was not included in the bounds.
If x or y of the start is exactly zero no bounds fitting took place.
📄 Note to reviewers
Example route (markers offscreen after fit):
https://valhalla.openstreetmap.de/directions?profile=car&style=carto&alternates=1&lang=de-DE&wps=12.879597133807124%2C63.50063786698544%2C12.977819149130966%2C63.56108239540447
If you drag marker 2 slightly it centers on the route and you need to zoom out before you can see it again.
Example route x of start position is zero:
http://valhalla.local/directions?profile=bicycle&style=carto&wps=0%2C52.049586%2C0.008573172345307967%2C52.088571687614746&lang=de-DE
📷 Screenshots