I'm currently working on a project where i need to get the location based on city + country code input. I know it is possible to do using zip codes + country but i think it should be possible to input only city and location should look inside the offline geonames database to get the correct coordinates.

I'm currently testing this for Italian cities and everything is fine.

I want to add a API function called location_get_city_data() the function will run instead of location_get_postalcode_data if city is specified and postal code is not.

Tell me what do you guys think about this. Is it useful for you ?

Comments

xatoo_’s picture

Title: Hello » Adding location_get_city_data() as alternative to location_get_postalcode_data()
Priority: Critical » Minor

Well I am sure that there are some people who would like to see this. Whether it is going to be adapted in the module or not, a patch would be nice to have. But please next time be more descriptive in your choice of subject and don't use the critical priority unless a bug renders a module, a core system, or a popular function unusable.

ankur’s picture

Status: Active » Closed (won't fix)

The easy quick way to do this would be to just use the geocoding feature, which typically sends whatever complete location fields you have for geocoding.