Jump to content

IOS List of Countries - But How Do I Find The Counties?


spires

Recommended Posts

lol, Sorry it is a PHP question.

 

Basically, yes I don't know where to get the info, which I'll be able to find.

But also don't know who to structure the DB.

 

What I'm after doing to just like on the dating sites.

Where you can select an area, e.g London, then view profiles with a selected mile radious. e.g 10 miles.

 

I'm assuming it is to do with the IOS.

 

Before I had:

Country

- id

- name

 

Country

- id

- countryID

- name

 

Area

- id

- countryID

- countyID

 

Areacode

- id

- code

 

 

But this is not going to allow me to do what I need.

 

Any idea, ho I should be structuring it?

 

 

Thanks :)

Doing this globally is going to be VERY difficult.

 

You're going to have to have a database filled with positional data of EVERY area code for EVERY county for EVERY country you want to support.

 

Once you have that, it's a matter of a few SQL queries

 

You could also avoid this by implementing the Google Maps API somehow. From what I understand Google Maps can convert an address to a latitude/longitude pair.

http://code.google.com/apis/maps/documentation/geocoding/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.