OpenStreetMap

Better Address Search with a quick JS hack

Posted by karussell on 27 January 2014 in English. Last updated on 14 May 2014.

Update

We are now using a geocoding solution with real address suggestions. Based on photon.

Address Suggestion

Old text

If you search for a location on openstreetmap.org you’ll probably miss some autocompletion. Autocompletion requires some server resources and when you have a normal SQL database (as it is the case for normal nominatim installation) this is nearly impossible. There is an Open Source solution called photon using the nominatim DB for feeding and for the search it uses Apache Solr. I highly recommend looking at this.

But if you just want to use nominatim I developed a bit JavaScript magic which displays the possible entries if you click the small triangle in the right corner of every input. And then if you hover the mouse over one entry it will immediately display the map. Test it here and sources are here - it stands under Apache License and requires jQuery Autocomplete.

address search via js

BTW: Maybe you have some time to use this into the latest effort that wants to have routing on the main osm.org site? Check this fork!

Discussion

Log in to leave a comment