Hi Per, this topic seems to come up frequently lately and I'm actually glad you asked before going off implementing something. So forgive me if I jump in with a more general remark on the topic.
On Wed, Aug 29, 2012 at 12:26:02PM +0200, Per Eric Rosén wrote: > I'm trying to build a autocompletion name lookup for a HTML5-based > cycle map. Is there any API where you can make wildcard > nominatim-style lookups? > > For exempel "Bre*" would return "Bremen", "Brenner" etc. I will > limit my queries by bbox, but other sorting and limiting, like > sorting by distance to a given point, or place category, would be > useful. > > Probably somewhat like > http://oegeo.wordpress.com/2010/11/08/a-better-search-field-for-openstreetmap/ > > Seem to be suggested in > http://wiki.openstreetmap.org/wiki/Nominatim/Version2 > but I see no indication of that being implemented ... This is not yet implemented in Nominatim and using the current API to implement it client-side will not work because Nominatim only returns complete matches, i.e. in your example 'Bre' will never return 'Bremen'. It will return an empty result and such empty queries are the really expensive ones that give the server a hard time. Please, people, *do not implement auto-complete on top of nominatim.osm.org*. You will just end up flooding the server with so many nonsense requests that you attract the attention of the sysadmins. You do not want that. If you run your own installation of Nominatim, you are of course welcome to do whatever you want with it. Sarah _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev