How OSM namefinder works and how to mashup this webpage?


From this webpage, we can find a place by name. If I want to mashup this webpage (or the namefinder function) in my own webpage, is it possible to do so?

Actually, I viewed the source code of this webpage. It is just a html webpage. I looked over and over, but I just could not see how it finds a place by name. Because in the webage, there is code like this: . That means this webpage will handle the request by itself. But I could not figure it out that where the code is, and how it works.


namefinder is a php+mysql webapp
svn co

Though I have to warn you, I’ve sent other people down that path and none has come back, the name finder code base is in great need of love…

Hi, emj, thanks for your reply. We are talking again, and I am still in the same place and doing alomst the same work.

I am devloping a web application using (C#). If I want to intergrate the namefinder function into my own webpage, is it possible to do so? Shall I download the PHP code to my own server and integrate it into my own webpage, or by other methods? And is it very difficult? And will the namefinder searching efficiency bcome slow?

By the way, I can make IIS support ASP and PHP at same time. I am also wondering if there is a version of namefinder?


Hey again xintao, I think lambertus would answer this best.

Name finder is built to allow you call it via webservice, see or the wiki. for examples.

Almost no osm code is available in c# you have kosmos, but not much more. I don’t recommend you using the php namefinder scripts on your own server. Crappy response times might be an issue you can look past, and I think you will spend too much time on this if you implement namefinder by yourself.

Hi, lambertus, would you please help? I have sent you mail, could you please check it.



To keep the information usefull for others as well:

Browsers dont allow you to do crossdomain AJAX calls so you will have to use a proxy. The transport.php is a proxy for yournavigation you can find it in SVN. You can find examples of proxies everywhere with Google, e.g. OpenLayers also has one (python cgi-bin). The language where the proxy is written in doesn’t matter if it can relay the url parameters correctly. Your imitation as you described above should work if your proxy works OK and the url parameters are properly encoded.

Thanks, Lambertus. I have solved my problem using proxy. If anyone want the proxy file, just send me message.