Skip to content

[Feature] Add device geolocation to Search Location #527

Description

@chdenat

Context

The Search Location dialog requires users to enter an address or coordinates manually, even when they want to display their current position.

Requested behavior

Add a geolocation button to the right of the Search Location title. When selected, it uses the browser's device location and fills the location field with a human-readable place when reverse geocoding succeeds, or with the coordinates otherwise. It then immediately displays the exact device position on the map without running a text search. Keep the dialog open for five seconds so the user can verify the displayed location, then close it automatically.

Acceptance criteria

  • A clearly labelled geolocation button appears to the right of the Search Location title.
  • Selecting the button requests the device location through the browser's geolocation API.
  • The location field shows a human-readable place when reverse geocoding returns one, or latitude and longitude otherwise.
  • The exact device position is displayed on the map as soon as it is available, without requiring a text search or another action.
  • The dialog remains open for five seconds after the position is displayed, then closes automatically.
  • The user can close the dialog before the five-second timeout.
  • Permission denial, unavailable location, and geolocation errors are communicated clearly.
  • The button is keyboard accessible and has an accessible name.

Notes or questions

The browser may ask the user to grant location permission.

Technical notes

Reuse the existing geocoder reverse lookup and exact-coordinate map display flow where possible. Preserve the existing address and coordinate search behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions