GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Ascending order for states listing  XML
Forum Index -> General
Author Message
faisal



Joined: 20/10/2011 06:07:33
Messages: 2
Offline

I am new to this forum and the API. I am using Geonames API and able to list the states. However, I need that to be listed in Ascending Order alphabetically. As of now, the listing order is not ascending or Descending. Here is the URL that I am using.

http://api.geonames.org/search?featureCode=ADM1&maxRows=100&country=US&username=demo

Please help me getting the list in ASC order.

Thanks,

Faisal
marc



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

You have to sort it yourself. The service returns it sorted by 'relevancy' not alphabetically. The children service instead is sorted alphabetically.

Best Regards

Marc

[WWW]
faisal



Joined: 20/10/2011 06:07:33
Messages: 2
Offline

Thanks for your message. I have tried the following query but didn't work.

http://api.geonames.org/search?featureCode=ADM1&maxRows=100&country=US&username=demo order by ADM1 asc

Is there any example or reference as how to sort it alphabetically.

Thanks,

Faisal
marc



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

The service does not implement any order by function.

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team