forked from 0x2620/oxjs
update geo and geo tools (fix for palestine, remove image urls)
This commit is contained in:
parent
3fa654a815
commit
8e490eca2e
5 changed files with 6944 additions and 7547 deletions
|
|
@ -22,10 +22,9 @@ Ox.load.Geo = function(options, callback) {
|
|||
dissolved <[s]> Array of countries the country has been dissolved (merged, renamed or split) into
|
||||
east <n> Longitude of eastern boundary in deg
|
||||
googleName <s|u> Google Maps country name
|
||||
imageURLs <o> Collection of dataURLs
|
||||
marker <s> Map marker
|
||||
imdbCode <s|u> IMDb country code
|
||||
imdbName <s|u> IMDb country name
|
||||
languages <[s]> Array of languages that are spoken in this country more than in any other
|
||||
lat <n> Latitude of the center in deg
|
||||
lng <n> Longitude of the center in deg
|
||||
name <s> Name
|
||||
|
|
@ -155,12 +154,28 @@ Ox.load.Geo = function(options, callback) {
|
|||
return country;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.getImageByGeoname <f> Returns an image URL for a given geoname
|
||||
(type, size, geoname) -> <s> Image URL
|
||||
type <s> Image type ('flag' or 'icon')
|
||||
size <n> Image width (32, 256, 2048 (flag), 16, 256, 1024 (icon))
|
||||
geoname <s> Geoname
|
||||
@*/
|
||||
|
||||
Ox.getImageByGeoname = function(type, size, geoname) {
|
||||
var country = Ox.getCountryByGeoname(geoname),
|
||||
code = country ? country.code : 'NTHH';
|
||||
return Ox.PATH + 'Ox.Geo/png/' + type + 's/' + size + '/' + code + '.png';
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.getImageByLanguage <f> Returns an image URL for a given language
|
||||
(type, size, geoname) -> <s> Image URL
|
||||
type <s> Image type ('flag' or 'icon')
|
||||
size <n> Image width (32, 256, 2048 (flag), 16, 256, 1024 (icon))
|
||||
language <s> Language
|
||||
@*/
|
||||
|
||||
Ox.getImageByLanguage = function(type, size, language) {
|
||||
language = language
|
||||
.replace(' languages', '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue