Andy
Andy

Reputation: 2762

Geographical data encoding (standard codes for countries/regions/cities)

is there a standard way to encode the user location (country, state/region, town), so that I can ask the user to select these items upon registration and then use this data to show his location on the map?

Upvotes: 1

Views: 706

Answers (1)

Jamie Ide
Jamie Ide

Reputation: 49261

The ISO 3166 specification is the widely accepted standard for country and "primary subdivision" (i.e. state, province, canton, etc.) codes. Note that this is different than storing address data.

Upvotes: 1

Related Questions