Project:GeoNames
Version:6.x-2.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)
Issue tags:array, city, country, list, query

Issue Summary

Hi,

How should I query geonames_query($parameters) so that returns an array of countries,
and then for each country, an array of cities?

Kind Regards,
Jorge

Comments

#1

Status:active» postponed (maintainer needs more info)

This module just provides an interface to services, and data, provided by http://www.geonames.org/ . If you can indicate a function (or functions) there that contains this information, great. Otherwise we can't do it.

Please close this ticket if your issue has been resolved (or cannot be resolved). Cheers, Simon

#2

Status:postponed (maintainer needs more info)» closed (works as designed)

I can only suggest that you get the DB dump from geonames.org, load it into your Drupal site, and query this to get a list of all countries and all cities over a certain size. Doing this via the web-servcce would probably be pretty inefficient: grab a list of all countries, then iterate through each looking for the capital, then finding siblings of that. Summary: not possible with provided API.

nobody click here