diff --git a/source/Ox.Geo/Ox.Geo.js b/source/Ox.Geo/Ox.Geo.js index e1930d8a..b6a153f5 100644 --- a/source/Ox.Geo/Ox.Geo.js +++ b/source/Ox.Geo/Ox.Geo.js @@ -125,7 +125,6 @@ Ox.load.Geo = function(options, callback) { > Ox.getCountryByCode('US').name 'United States' @*/ - Ox.getCountryByCode = function(code) { var country; code = code.toUpperCase(); @@ -147,7 +146,6 @@ Ox.load.Geo = function(options, callback) { > Ox.getCountryByGeoname('The Bottom, Saba, Bonaire, Sint Eustatius and Saba').code 'BQ' @*/ - Ox.getCountryByGeoname = function(geoname) { // fixme: UAE correction doesn't belong here, fix in map geoname = (geoname || '').replace(' - United Arab Emirates', ', United Arab Emirates') @@ -167,7 +165,6 @@ Ox.load.Geo = function(options, callback) { > Ox.getCountryByName('USA').code 'US' @*/ - Ox.getCountryByName = function(name) { var country; Ox.forEach(Ox.COUNTRIES, function(c) { @@ -179,6 +176,10 @@ Ox.load.Geo = function(options, callback) { return country; }; + Ox.getFlagByCountryCode = function(code, size) { + return Ox.PATH + 'Ox.Geo/png/flags/' + size + '/' + code + '.png'; + }; + /*@ Ox.getImageByGeoname Returns an image URL for a given geoname (type, size, geoname) -> Image URL @@ -186,10 +187,9 @@ Ox.load.Geo = function(options, callback) { size Image width (32, 256, 2048 (flag), 16, 256, 1024 (icon)) geoname Geoname @*/ - Ox.getFlagByGeoname = function(geoname, size) { var country = Ox.getCountryByGeoname(geoname), - code = country ? country.flag || country.code : 'NTHH'; + code = country ? country.code : 'NTHH'; return Ox.PATH + 'Ox.Geo/png/flags/' + size + '/' + code + '.png'; }; @@ -200,7 +200,6 @@ Ox.load.Geo = function(options, callback) { size Image width (32, 256, 2048 (flag), 16, 256, 1024 (icon)) language Language @*/ - Ox.getFlagByLanguage = function(language, size) { language = language .replace(' languages', '')