Rename long to lng
This commit is contained in:
parent
6856ff7254
commit
572445de39
|
@ -13,7 +13,7 @@ exports.filter = function (arr, filter) {
|
|||
// filter out objects without locations
|
||||
if(!loc) return;
|
||||
if(typeof loc.lat !== 'number') return;
|
||||
if(typeof loc.long !== 'number') return;
|
||||
if(typeof loc.lng !== 'number') return;
|
||||
|
||||
var d = distanceBetween(origin, loc);
|
||||
|
||||
|
@ -46,7 +46,7 @@ var distanceBetween = exports.distanceBetween = function distanceBetween(a, b) {
|
|||
var ys = 0;
|
||||
xs = a.lat - b.lat;
|
||||
xs = xs * xs;
|
||||
ys = a.long - b.long;
|
||||
ys = a.lng - b.lng;
|
||||
ys = ys * ys;
|
||||
|
||||
return Math.sqrt( xs + ys );
|
||||
|
|
Loading…
Reference in New Issue