GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Chained Dropdown Lists  XML
Forum Index -> FAQ - frequently asked questions
Author Message
rballman



Joined: 17/03/2007 23:18:30
Messages: 6
Offline

Hello,

I recently imported the allcountries.txt and countryInfo.txt into my MsSQL database. What is the best way to have multiple chained dropdown lists to find out someone's city. For example:

Select Country -> State -> City

OR

Select Country -> City


Any help would be appreciated. Thanks
marc



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

I would say it depends on how many cities you are using and which countries you are dealing with. If you use all 2 million populated places it will become a pretty large dropdown list for some countries.

Cheers

Marc

[WWW]
rballman



Joined: 17/03/2007 23:18:30
Messages: 6
Offline

How is the database linked? For example, how might one link the following:

Country -> Region -> City

...where Region could be a province or state.


Thanks!
marc



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

The first order administrative divisions have the feature class A and the feature code ADM1. Their code is referenced in the column admin1Code.

Marc

[WWW]
rballman



Joined: 17/03/2007 23:18:30
Messages: 6
Offline

Is there documentation on this column admin1Code? I am having trouble figuring out how to related the columns.

For example how would I find the following in the database:

US -> California -> Los Angeles


I think the Fipscode for California is 06, but when i typed that into admin1Code column the countryCode was not 'US'. How can I find more information on how to relate the columns?

Thank you.
dpc_map



Joined: 07/02/2007 04:02:37
Messages: 16
Offline

For US locations, the admin1_code is the two character state code. So for Los Angeles, California, use 'CA' for the admin1_code.

If you search the geonames database for name='Los Angeles' and admin1_code = '06', you'll get
Los Angeles, Columbia
bat



Joined: 11/02/2010 11:52:40
Messages: 2
Offline

Hi everybody,

Is there any way to retrieve country > state > cities informations to create dropdown lists with webservices (free or not) ?

With "children" we can't get all the cities of a state (we must pass through all subdivisions)

Thanks and sorry for my broken english
 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team