forked from 0x2620/oxjs
merging changes
This commit is contained in:
parent
fe026fc0e5
commit
6530780bf0
2 changed files with 104 additions and 26 deletions
|
|
@ -1,8 +1,8 @@
|
|||
Ox.COUNTRIES = [
|
||||
// 302 countries ()
|
||||
// 304 countries (see http://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country)
|
||||
// 193 sovereign countries (see http://en.wikipedia.org/wiki/List_of_sovereign_states)
|
||||
// 11 unrecognized countries (see http://en.wikipedia.org/wiki/List_of_sovereign_states#Other_states)
|
||||
// 62 dependent countries (4 Australia, 2 China, 2 Denmark, 1 Finland, 13 France, 4 Netherlands,
|
||||
// 62 dependent countries (6 Australia, 2 China, 2 Denmark, 1 Finland, 13 France, 4 Netherlands,
|
||||
// 3 New Zealand, 2 Norway, 2 Spain, 22 United Kingdom, 6 United States, plus Antarctica)
|
||||
// 34 former countries (http://en.wikipedia.org/wiki/ISO_3166-3, http://www.imdb.com/country/)
|
||||
// 2 other countries (EU, UK)
|
||||
|
|
@ -214,8 +214,10 @@ Ox.COUNTRIES = [
|
|||
{code: 'TW', continent: 'Asia', name: 'Taiwan', region: 'Eastern Asia', type: 'unrecognized'},
|
||||
{code: 'MD-TR', continent: 'Europe', name: 'Transnistria', region: 'Eastern Europe', type: 'unrecognized'},
|
||||
{code: 'AQ', continent: 'Antarctica', country: ['Argentina', 'Australia', 'Chile', 'France', 'New Zealand', 'Norway', 'United Kingdom'], name: 'Antarctica'},
|
||||
{code: 'AU-AC', country: 'Australia', name: 'Ashmore and Cartier Islands', type: 'dependent'},
|
||||
{code: 'CX', continent: 'Asia', country: 'Australia', name: 'Christmas Island', region: 'South-Eastern Asia', type: 'dependent'},
|
||||
{code: 'CC', continent: 'Asia', country: 'Australia', name: 'Cocos Islands', region: 'South-Eastern Asia', type: 'dependent'},
|
||||
{code: 'AU-CS', country: 'Australia', name: 'Coral Sea Islands', type: 'dependent'},
|
||||
{code: 'HM', continent: 'Antarctica', country: 'Australia', name: 'Heard Island and McDonald Islands', type: 'dependent'},
|
||||
{code: 'NF', continent: 'Oceania', country: 'Australia', name: 'Norfolk Island', region: 'Australia and New Zealand', type: 'dependent'},
|
||||
{code: 'HK', continent: 'Asia', country: 'China', name: 'Hong Kong', region: 'Eastern Asia', type: 'dependent'},
|
||||
|
|
@ -248,7 +250,7 @@ Ox.COUNTRIES = [
|
|||
{code: 'IC', continent: 'Africa', country: 'Spain', name: 'Canary Islands', region: 'Northern Africa', type: 'dependent'},
|
||||
{code: 'EA', continent: 'Africa', country: 'Spain', name: 'Ceuta and Melilla', region: 'Northern Africa', type: 'dependent'},
|
||||
{code: 'AI', continent: 'North America', country: 'United Kingdom', name: 'Anguilla', region: 'Carribean', type: 'dependent'},
|
||||
{code: 'AC', continent: 'Africa', country: 'United Kingdom', name: 'Ascension Island', region: 'Western Africa', type: 'dependent'},
|
||||
{code: 'AC', continent: 'Africa', country: 'United Kingdom', name: 'Ascension', region: 'Western Africa', type: 'dependent'},
|
||||
{code: 'BM', continent: 'North America', country: 'United Kingdom', name: 'Bermuda', region: 'Northern America', type: 'dependent'},
|
||||
{code: 'IO', country: 'United Kingdom', name: 'British Indian Ocean Territory', type: 'dependent'},
|
||||
{code: 'VG', continent: 'North America', country: 'United Kingdom', name: 'British Virgin Islands', region: 'Carribean', type: 'dependent'},
|
||||
|
|
@ -319,11 +321,26 @@ Ox.COUNTRY_CODES = Ox.map(Ox.COUNTRIES, function(country) {
|
|||
|
||||
Ox.getCountryCode = (function() {
|
||||
var aliases = {
|
||||
'Cocos (Keeling) Islands': 'Cocos Islands',
|
||||
'Congo': 'Republic of the Congo',
|
||||
'French Southern and Antarctic Lands': 'French Southern Territories',
|
||||
'Macedonia (FYROM)': 'Macedonia',
|
||||
'Pitcairn Islands': 'Pitcairn',
|
||||
'Reunion': 'Réunion',
|
||||
'St Barthélemy': 'Saint Barthélemy',
|
||||
'St Helena': 'Saint Helena',
|
||||
'St Kitts and Nevis': 'Saint Kitts and Nevis',
|
||||
'St Lucia': 'Saint Lucia',
|
||||
'St Pierre and Miquelon': 'Saint Pierre and Miquelon',
|
||||
'St Vincent and the Grenadines': 'Saint Vincent and the Grenadines',
|
||||
'The Bahamas': 'Bahamas',
|
||||
'The Gambia': 'Gambia',
|
||||
'The Netherlands': 'Netherlands',
|
||||
'Trinidad & Tobago': 'Trinidad and Tobago',
|
||||
'UK': 'United Kingdom',
|
||||
'US Virgin Islands': 'United States Virgin Islands',
|
||||
'USA': 'United States'
|
||||
'USA': 'United States',
|
||||
'Western Sahara': 'Sahrawi'
|
||||
};
|
||||
return function(geoname) {
|
||||
var countryCode = '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue