Skip to content

SearchBox: implement ?qd=query for search from browser #1002

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

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Conversation

zbycz
Copy link
Owner

@zbycz zbycz commented Apr 21, 2025

Based on PR #988 by @amenk.

You can supply eg a query ?qd=London and osmapp will open as if user typed this query and selected first result.

Sometimes it can be confusing, because Preset category is first matching result. But you can easily click the SearchBox and select the second result.

Note: photon geocoder is experiencing long loading times, maybe becuase the company got acquired recently.

Followup:

  • add opensearch.xml
  • show spinner while loading the result

Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Apr 21, 2025 9:26am

@zbycz zbycz marked this pull request as draft April 21, 2025 09:28
@amenk
Copy link
Contributor

amenk commented Apr 21, 2025

Cool

Is q= also supported to show the result list and not click the first result?

And actually it's very intended to use presets in qd= so that we can link to pages with for example all restaurants in an area on the map

@amenk
Copy link
Contributor

amenk commented Apr 21, 2025

Did you try

qd=amenity%3Drestaurant

For overpass queries, too?

That also would be cool

@amenk
Copy link
Contributor

amenk commented Apr 21, 2025

qd=amenity%3Drestaurant

actually it is working 👍

@zbycz
Copy link
Owner Author

zbycz commented Apr 22, 2025

Hi @amenk - this PR only adds the qd param as this was more straight forward. The ?q could be done followup PR.

@zbycz zbycz marked this pull request as ready for review April 22, 2025 07:40
@zbycz zbycz merged commit 416219b into master Apr 22, 2025
6 checks passed
@zbycz zbycz deleted the qd-query branch April 22, 2025 07:40
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.

2 participants