Hi, I've got a leaflet map with mapbox map layer under it. For geocoding I used nominatim, but since they don't allow autocomplete (for a good reason) I'm using the mapbox geocoding. The function works well but the poi results are often way off (up to hundred meters) and often show results from poi's who are moved years ago. So I'd like to go back to Nominatim (web version) and was thinking if it is possible to get permission to autosuggest if I can build in a big delay? For example send an autosuggest from the text in the text field every 0,5 seconds, or after a certain amount of digits etc? My main goal is to not have the user push the search button every time, so any ideas on that would be great. Or any ideas where to ask this? thanks! asked 16 Dec '19, 14:16 tijmenheid |
Nominatim isn't good at autocomplete (incomplete/partial) queries. Searching for "New Yor" doesn't return New York. Consider using https://photon.komoot.de/ which uses Nominatim processed database as input. answered 16 Dec '19, 14:24 mtmail looks good, thanks!
(16 Dec '19, 17:52)
tijmenheid
Thanks again, it works! Just one small extra question (maybe you'Re familiar with Photon) When searching for a Poi I get the name, address etc, but I would like to get other info too, f.e. website, phonenumber, so it shows up with the icon when it's shown on the map. I know they use 'osm_value' and 'osm_tag', but just can'T find a way to get more out of it. Any ideas?
(20 Dec '19, 21:41)
tijmenheid
1
Photon doesn't have that in their searchindex (https://github.com/komoot/photon/issues/395). You could query Nominatim using the osmtype and osmid (http://nominatim.org/release-docs/latest/api/Lookup/ https://nominatim.openstreetmap.org/lookup?osm_ids=N762657373&extratags=1&format=json) but then you could run into the 1 query per second limit again.
(20 Dec '19, 22:44)
mtmail
|