smeijer / leaflet-geosearch

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

Suggestions dropdown ( auto complete ), dutch zip code without space #331

Closed Peetzer closed 2 years ago

Peetzer commented 2 years ago

We use the openstreetmap provider,

Suggestions contain dutch zip codes without space

https://nominatim.openstreetmap.org/ui/search.html?q=A12%2c%20Waddinxveen

when using the geosearch and for example type A12, Waddinxveen, pick first suggestion,

A12, Waddinxveen, South Holland, Netherlands, 2741JV, Netherlands

The address is not looked up.

Changing the zip code with space does work,

A12, Waddinxveen, South Holland, Netherlands, 2741 JV, Netherlands

We tried to use resultFormat but this changes only the label

mtmail commented 2 years ago

There's been recent major work on postcode handling and normalization (how to deal with spaces and dashes) in Nominatim https://nominatim.org/2022/06/26/state-of-postcodes.html and not all changes are live yet on nominatim.openstreetmap.org servers.

I suggest filing an issue directly at https://github.com/osm-search/Nominatim/issues

Peetzer commented 2 years ago

Issue lies with the provider, so closing

Peetzer commented 2 years ago

There's been recent major work on postcode handling and normalization (how to deal with spaces and dashes) in Nominatim https://nominatim.org/2022/06/26/state-of-postcodes.html and not all changes are live yet on nominatim.openstreetmap.org servers.

I suggest filing an issue directly at https://github.com/osm-search/Nominatim/issues

* A12, Waddinxveen, 2741JV => not found (https://nominatim.openstreetmap.org/search.php?q=A12%2C+Waddinxveen%2C+2741JV&format=jsonv2)

* A12, Waddinxveen, 2741 JV => found (https://nominatim.openstreetmap.org/search.php?q=A12%2C+Waddinxveen%2C+2741+JV&format=jsonv2)

See also https://github.com/osm-search/Nominatim/issues/2762

Hm auto complete should not be used according to the policy,

https://operations.osmfoundation.org/policies/nominatim/