NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%


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 ♦
33.3k21309459
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

Maybe a look at Photon can be helpful?

permanent link

answered 25 Sep '13, 17:17

stephan75's gravatar image

stephan75
12.6k556210
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
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:

×689
×8

question asked: 24 Sep '13, 15:27

question was seen: 9,422 times

last updated: 26 Sep '13, 08:35

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum