| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 20/11/2009 08:15:01
|
newtonpage
Joined: 20/11/2009 08:09:57
Messages: 2
Offline
|
Basic questions from a newbie:
If I submit a valid country code and state/ province, can geonames return a list of cities? Then, if I supply valid country code and state/ province AND this city, can I get a list of zip codes?
Is this available through the documented webservice?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 20/11/2009 21:14:20
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
You can certainly do this.
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 03/12/2009 06:18:53
|
newtonpage
Joined: 20/11/2009 08:09:57
Messages: 2
Offline
|
Thank you for the reply
I am very impressed with the geonames service and appreciate the work done here but I find the documentation a little thin - - and BTW, I would be happy to contribute code examples and other How-To's once I get my arms around this.
So - - Given country and state / province, I would like to do the following:
1) obtain a list of named cities for this country and state / province pair.
Having obtained this, I would then make certain the city is correctly entered.
2) once I have a valid a city, if the user enters zip / postal (this field is optional), I would then like to obtain a list of zip / postal codes for that city and make certain that the city - zip pair is valid.
3) alternatively, if the user enters zip / postal first, and then city, I would like to submit country and zip / postal and then check the city.
timely help would be greatly appreciated and I reiterate my offer to help - - and this includes creation of graphics if needed.
I have tried many variations using the geonames functions with no luck.
thanks so much
S
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 03/12/2009 08:03:53
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
1) use the search function with adminCode and country parameters
2) use the postal code search with the placeName and country. I wouldn't use the admin as it may not be filled in all countries
3) again use the postal code search
In general I would not force the validation, I would more use it as a suggest or warning that the combination may be wrong. It may happen that new postal codes are not yet in the database. For a forced validation it is better to use the regular expression of the postal code format.
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 17/06/2010 12:52:07
|
arathi
Joined: 17/06/2010 12:48:59
Messages: 1
Offline
|
is it possible to get the list of states when i enter city name in US?
how to do that?
|
|
|
 |
|
|