smeijer / leaflet-geosearch

A geocoding/address-lookup library supporting various api providers.
https://smeijer.github.io/leaflet-geosearch/
MIT License
1.02k stars 271 forks source link

Search for "postalcode" instead of "query" #260

Open wlfnkls opened 3 years ago

wlfnkls commented 3 years ago

Hey,

is there a way to search for "postalcode" instead of "query", so the request doesnt look like https://nominatim.openstreetmap.org/search?accept-language=de&countrycodes=de&q=XXXXX&format=json

but like this https://nominatim.openstreetmap.org/search?accept-language=de&countrycodes=de&postalcode=XXXXX&format=json ?

The problem I have: when I enter the first digits of a postalcode, the results have noting in common with the actual city, but I got various places. My goal is to output all cities / towns / ... that start with those first digits.

Thank you!