forked from 0x2620/oxjs
more map
This commit is contained in:
parent
122cc33cb5
commit
9067e96499
2 changed files with 141 additions and 35 deletions
|
|
@ -1870,6 +1870,14 @@ Geo functions
|
|||
return {lat: lat, lng: lng};
|
||||
};
|
||||
|
||||
Ox.getDegreesPerMeter = function(lat) {
|
||||
/*
|
||||
>>> Ox.EARTH_CIRCUMFERENCE = 360 / Ox.getDegreesPerMeter(0)
|
||||
true
|
||||
*/
|
||||
return 360 / Ox.EARTH_CIRCUMFERENCE / Math.cos(lat * Math.PI / 180);
|
||||
};
|
||||
|
||||
Ox.getDistance = function(point0, point1) {
|
||||
/*
|
||||
>>> Ox.EARTH_CIRCUMFERENCE == Ox.getDistance({lat: -45, lng: -90}, {lat: 45, lng: 90}) * 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue