nominatim-ui icon indicating copy to clipboard operation
nominatim-ui copied to clipboard

Add amenity field on structured search form

Open mtmail opened this issue 1 year ago • 2 comments

Related @https://github.com/osm-search/Nominatim/pull/3054

mtmail avatar May 08 '23 11:05 mtmail

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

0xSaksham avatar Oct 25 '23 13:10 0xSaksham

@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.

mtmail avatar Oct 30 '23 15:10 mtmail