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

Fix: Show both lat/lon and lon/lat variations in dropdown when searching coordinates #10725

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

Conversation

Deeptanshu-sankhwar
Copy link
Contributor

Fixes #10720

Summary

This PR fixes issue #10720 by improving the coordinate input handling in the search bar. When a user enters a coordinate pair, the dropdown now displays both possible interpretations:

  • Lat/Lon format (default order)
  • Lon/Lat format (alternative order)

Additionally, if one of the coordinate values is outside the valid latitude range (-90 to 90), only the valid interpretation is shown, following the behavior seen on osm.org.

Changes Made

  • Generates two variations of the coordinate pair (lat/lon and lon/lat).
  • Validates the latitude range, ensuring only correct results appear in the dropdown.
  • Prevents incorrect coordinate interpretations by only displaying one option when one value is outside valid latitude bounds.

Preview

Screen.Recording.2025-01-31.at.10.18.32.PM.mp4

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.

Users sometimes want to search for X,Y, not only Y,X
1 participant