1
0
Fork 0
forked from 0x2620/oxjs

some improvements to splitpanel

This commit is contained in:
rolux 2010-11-28 15:06:47 +00:00
commit 96a6902b0e
3 changed files with 272 additions and 124 deletions

View file

@ -13,6 +13,8 @@ Constants
Ox.AMPM = ["AM", "PM"];
Ox.DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
Ox.EARTH_RADIUS = 6378137;
Ox.EARTH_CIRCUMFERENCE = Ox.EARTH_RADIUS * 2 * Math.PI;
Ox.MONTHS = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
Ox.WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday",
@ -1426,6 +1428,33 @@ Ox.formatValue = function(num, str) {
return val;
};
/*
================================================================================
Geo functions
================================================================================
*/
Ox.getArea = function(point0, point1) {
};
Ox.getCenter = function(point0, point1) {
};
Ox.getDistance = function(point0, point1) {
point0 = point0.map(function(deg) {
return Ox.rad(deg);
});
point1 = point1.map(function(deg) {
return Ox.rad(deg);
});
}
Ox.getMetersPerDegree = function(point) {
return Math.cos(point[0] * Math.PI / 180) * Ox.EARTH_CIRCUMFERENCE / 360;
};
/*
================================================================================
Math functions