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

Add amenity field on structured search form #209

Open
mtmail opened this issue May 8, 2023 · 2 comments
Open

Add amenity field on structured search form #209

mtmail opened this issue May 8, 2023 · 2 comments
Labels
good first issue Good for newcomers

Comments

@mtmail
Copy link
Collaborator

mtmail commented May 8, 2023

Related @osm-search/Nominatim#3054

@mtmail mtmail added the good first issue Good for newcomers label May 8, 2023
@0xSaksham
Copy link

@mtmail I can work on this issue. Is there anything I should know about first?

@mtmail
Copy link
Collaborator Author

mtmail commented Oct 30, 2023

@0xSaksham

Thank you for the offer.

https://nominatim.openstreetmap.org/ui/search.html is an example installation of the nominatim-ui. You can run it on your local machine easily. yarn dev will auto-reload the pages after every change, see the CONTRIBUTE.md for instructions.

The Nominatim backend API search has two query modes: "simple" (also called "free form") and "structured".
https://nominatim.org/release-docs/latest/api/Search/#endpoint

On the nominatim-ui frontend when you click "Structured" on the /search.html page you will see a list of fields, e.g city, state, country.

Goal is to add another field called "amenity". A user should be able to search for amenity=restaurant, city=paris, country=france and receive a list of restaurants as result.

The relevant code is in /src/components/SearchSection.svelte. Since it's the 7th field a lot can probably be copied from the other 6.

The new feature won't need a test.

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

No branches or pull requests

2 participants