GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
I have problems using the webservice with blanks and special characters  XML
Forum Index -> FAQ - frequently asked questions
Author Message
harshadashende



Joined: 26/11/2009 12:14:15
Messages: 3
Offline

Thank you for your reply, but i don't know how to such encoding it in VC++.
Javier Reinoso



Joined: 24/12/2009 15:24:57
Messages: 1
Offline

I am making a software for get geonames, in flash with visual basic or mdm zinc...

When is only the flash, the swf load well the data from geonames.org, but when put in visual basic or mdm zinc, not get the xml answer...

Why???

Here are a complete example with the source, the exe - not work -, the fla, the swf:

http://www.astrodreams.com/aaa/xmlzincsample.rar

I test for download a xml from my web site, and work, but in the exe when attempt to load the data from geonames - for example: http://ws.geonames.org/search?q=london&maxRows=20 -, not work, in the exe the flash not load the xml from geonames and I not know why...

Why?

Good day!!!
eladzaa



Joined: 25/05/2011 10:23:11
Messages: 1
Offline

Hi,

I'm trying to use the wikipediaSearch webservice with the title parameter on the term 'Musée de Cluny'. I'm using URL encoding:

http://ws.geonames.org/wikipediaSearch?&maxRows=1&title=Mus%C3%A9e%20de%20Cluny&username=demo

but getting no results.

the environment is .NET - CSharp.

Wikipedia value is available:

http://en.wikipedia.org/wiki/Mus%C3%A9e_de_Cluny

What am I doing wrong?

Regards,
Elad.
marc



Joined: 08/12/2005 07:39:47
Messages: 3942
Offline

The domain name ws.geonames.org is desupported:

http://geonames.wordpress.com/2011/01/28/application-identification-for-free-geonames-web-services/

Please use the domain api.geonames.org and it will work:
http://api.geonames.org/wikipediaSearch?&maxRows=1&title=Mus%C3%A9e%20de%20Cluny&username=demo

Best

Marc

[WWW]
nmfr



Joined: 13/03/2017 17:44:19
Messages: 1
Offline

I am trying to cal the search Web Service to search for "Ivory Coast", using the name parameter, in Portuguese (which is "Costa do Marfim") and i am having trouble figuring out whats wrong:

Name: costa marfim
http://api.geonames.org/searchJSON?maxRows=20&username=frames&featureClass=A&featureClass=P&featureClass=L&orderby=population&name=costa%20marfim&lang=pt&searchlang=pt
Result: Code:
{"totalResultsCount":0,"geonames":[]}

Name: costa do marfim
http://api.geonames.org/searchJSON?maxRows=20&username=frames&featureClass=A&featureClass=P&featureClass=L&orderby=population&name=costa%20do%20marfim&lang=pt&searchlang=pt
Result: Code:
{"totalResultsCount":0,"geonames":[]}

Name: costa marfim (with "+" instead of the "%20")
http://api.geonames.org/searchJSON?maxRows=20&username=frames&featureClass=A&featureClass=P&featureClass=L&orderby=population&name=costa+marfim&lang=pt&searchlang=pt
Result: Code:
{"totalResultsCount":0,"geonames":[]}

Name: marfim costa
http://api.geonames.org/searchJSON?maxRows=20&username=frames&featureClass=A&featureClass=P&featureClass=L&orderby=population&name=marfim%20costa&lang=pt&searchlang=pt
Result: Code:
{"totalResultsCount":1,"geonames":[{"adminCode1":"00","lng":"-5.5","geonameId":2287781,"toponymName":"Republic of Côte d’Ivoire","countryId":"2287781","fcl":"A","population":21058798,"countryCode":"CI","name":"Costa do Marfim","fclName":"country, state, region,...","countryName":"Costa do Marfim","fcodeName":"independent political entity","adminName1":"","lat":"8","fcode":"PCLI"}]}

Name: "costa do marfim"
http://api.geonames.org/searchJSON?maxRows=20&username=frames&featureClass=A&featureClass=P&featureClass=L&orderby=population&name=%22costa%20do%20marfim%22&lang=pt&searchlang=pt
Result: Code:
{"totalResultsCount":1,"geonames":[{"adminCode1":"00","lng":"-5.5","geonameId":2287781,"toponymName":"Republic of Côte d’Ivoire","countryId":"2287781","fcl":"A","population":21058798,"countryCode":"CI","name":"Costa do Marfim","fclName":"country, state, region,...","countryName":"Costa do Marfim","fcodeName":"independent political entity","adminName1":"","lat":"8","fcode":"PCLI"}]}


Is "%20" the correct enconding for white spaces? If so why does name=costa%20marfim return no results?
What search is done when the name is enclosed in double quotes "%22costa%20do%20marfim%22"? Does it search for a exact name?

Thank in advance for the help.
 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team