nominatim-ui
nominatim-ui copied to clipboard
Add amenity field on structured search form
Related @https://github.com/osm-search/Nominatim/pull/3054
@mtmail I can work on this issue. Is there anything I should know about first?
@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.