forked from 0x2620/oxjs
better filesystem structure for modules and themes; 'minified' ui if debug option not set; dynamially generated map markers
This commit is contained in:
parent
358ee1bc96
commit
4489e88f44
596 changed files with 115093 additions and 17682 deletions
33
source/Ox.Geo/Ox.Geo.js
Normal file
33
source/Ox.Geo/Ox.Geo.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Ox.load.Geo = function(options, callback) {
|
||||
|
||||
Ox.loadJSON(Ox.PATH + 'Ox.Geo/Ox.Geo.json', function(data) {
|
||||
|
||||
Ox.COUNTRIES = data;
|
||||
|
||||
Ox.getCountryByCode = function(code) {
|
||||
var country;
|
||||
Ox.forEach(Ox.COUNTRIES, function(c) {
|
||||
if (c.code == code) {
|
||||
country = c;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return country;
|
||||
};
|
||||
|
||||
Ox.getCountryByName = function(name) {
|
||||
var country;
|
||||
Ox.forEach(Ox.COUNTRIES, function(c) {
|
||||
if (c.name == name) {
|
||||
country = c;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return country;
|
||||
};
|
||||
|
||||
callback(true);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue