Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crop coordinates when replacing directions url #5794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AntonKhorev
Copy link
Collaborator

@AntonKhorev AntonKhorev commented Mar 12, 2025

Here's some strange behavior:

  1. Zoom in close enough.
  2. Build a route, like this one.
  3. Look at the browser location bar. It's going to contain the coordinates of endpoints. Notice that they have 5-6 digits after decimal point.
  4. Zoom out to see the entire planet.
  5. Click Go to rebuild the route. This will zoom you back to the same route.
  6. Look at the location bar again. Now the coordinates have only one digit after decimal point and they are the same for starting/ending points. That can't be right.
  7. Click Reload and you'll be taken to some other place and the route will be gone.

The OSM.cropLocation that I'm removing (and whatever preceded it for years) makes no sense. It means build a route using one set of coordinates, but put something else in the url. The coordinates are already limited to zoom-dependent precisions when endpoint markers are placed. There's no need to crop them again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant