2
1

Hi, i try to build an autocomplete textbox which should display countries and cities. Because the list should also care for variant names of cities and countries and different languages (like i.e. "Cologne" or "Köln") I thought about using nominatim. Unfortunately I cannot find any help on how to filter the resultset to just cities and countries. Any help is highly appreciated :-).

your's felix

asked 24 Sep '13, 15:27

felixhelix's gravatar image

felixhelix
41114
accept rate: 0%


Maybe a look at Photon can be helpful?

permanent link

answered 25 Sep '13, 17:17

stephan75's gravatar image

stephan75
12.5k454209
accept rate: 6%

Yes, maybe I'll give it a Iook - the description sounds very promising. But I have to set photon and nominatim up on my own - haven't I? I guess that exceeds my skills by now. I just want to simply fire a request and get results - lazy guy that I am.

(26 Sep '13, 08:35) felixhelix

Take a look at the parameters. If you want to limit your search to cities and countries only then just set the city or country parameter, e.g.

http://nominatim.openstreetmap.org/search?city=Köln

and

http://nominatim.openstreetmap.org/search?country=Croatia

Setting both at the same time only works if both are actually part of the address. In this example it won't work because there is no city named Köln in Croatia.

permanent link

answered 24 Sep '13, 17:09

scai's gravatar image

scai ♦
32.0k20293443
accept rate: 23%

Thanks Scai: Then I could build two queries and merge the results - this can be a solution - but with an overhead.

(26 Sep '13, 08:28) felixhelix
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×614
×8

question asked: 24 Sep '13, 15:27

question was seen: 6,300 times

last updated: 26 Sep '13, 08:35

powered by OSQA