forked from 0x2620/oxjs
fixing dateline bugs
This commit is contained in:
parent
3605ae1afb
commit
b7e236f056
3 changed files with 82 additions and 421 deletions
|
|
@ -359,45 +359,4 @@ Ox.getCountryCode = (function() {
|
|||
});
|
||||
return countryCode;
|
||||
};
|
||||
}());
|
||||
|
||||
Ox.Place = function(options) {
|
||||
|
||||
/*
|
||||
in: geoname, name, south, west, north, east
|
||||
out: country, countryCode, geonameReverse, lat, lng
|
||||
*/
|
||||
|
||||
var self = {},
|
||||
that = Ox.extend(this, options);
|
||||
|
||||
['south', 'west', 'north', 'east'].forEach(function(v) {
|
||||
self[v + 'Rad'] = Ox.rad(that[v]);
|
||||
});
|
||||
|
||||
self.geonames = that.geoname.split(', ').reverse();
|
||||
that.geonameReverse = self.geonames.join(', ');
|
||||
|
||||
Ox.forEach(Ox.COUNTRIES, function(country) {
|
||||
if (country.name == self.geonames[0]) {
|
||||
that.country = country.name;
|
||||
that.countryCode = country.code;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function getArea() {
|
||||
|
||||
}
|
||||
|
||||
function getCenter() {
|
||||
|
||||
}
|
||||
|
||||
function getRad(points) {
|
||||
|
||||
}
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue