Rename long to lng

This commit is contained in:
Ritchie Martori 2013-06-24 15:32:34 -07:00
parent 6856ff7254
commit 572445de39
1 changed files with 2 additions and 2 deletions

View File

@ -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 );