MenaraSolutions / geographer

PHP library that knows how countries and cities are called in any language
MIT License
761 stars 57 forks source link

Ability to get all cities from country #17

Open vitalybaev opened 7 years ago

vitalybaev commented 7 years ago

Hi, maybe I didn't investigated, but is there an ability to directly get cities within a country? The problem is that some small countries doesn't have states, so I couldn't get cities for this country.

Thanks!

dusterio commented 7 years ago

@vitalybaev hmm, one possibility would be setting the standard to Geonames - these countries still have Geonames cities. Looking at the data files, it would be quite easy to get all cities for a country directly, I may just implement it

chriys commented 7 years ago

@vitalybaev do you have examples of country without states ?

vellmur commented 7 years ago

@vitalybaev did you find a solution about how to get all cities for a single country?

vellmur commented 7 years ago

@vitalybaev now I need to find some city by name, if I have a country. Now I can find only region by name. Can you please give recommendation where better to add code for getting all cities for a single country? Better with search option (id, name, code), because data is too big.