From d51cf6e23d8612ab7cc1ae94239e6d2cdb2b5a31 Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Mon, 24 Jun 2013 15:32:22 -0700 Subject: [PATCH] Rename long to lng --- README.md | 8 ++++---- lib/geo-point.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 70bf931e..2eca44da 100644 --- a/README.md +++ b/README.md @@ -702,7 +702,7 @@ Asteroid Model's with a GeoPoint property and an attached DataSource may be quer Find the 3 nearest coffee shops. CoffeeShop.attachTo(oracle); - var here = new GeoPoint({lat: 10.32424, long: 5.84978}); + var here = new GeoPoint({lat: 10.32424, lng: 5.84978}); CoffeeShop.find({where: {location: {near: here}}}, function(err, nearbyShops) { console.info(nearbyShops); // [CoffeeShop, ...] }); @@ -711,8 +711,8 @@ Find the 3 nearest coffee shops. Get the distance to another `GeoPoint`. - var here = new GeoPoint({lat: 10, long: 10}); - var there = new GeoPoint({lat: 5, long: 5}); + var here = new GeoPoint({lat: 10, lng: 10}); + var there = new GeoPoint({lat: 5, lng: 5}); console.log(here.distanceTo(there, {type: 'miles'})); // 438 #### GeoPoint.distanceBetween(a, b, options) @@ -731,7 +731,7 @@ Get the distance between two points. The latitude point in degrees. Range: -90 to 90. -#### geoPoint.long +#### geoPoint.lng The longitude point in degrees. Range: -180 to 180. diff --git a/lib/geo-point.js b/lib/geo-point.js index f3010134..8b18e782 100644 --- a/lib/geo-point.js +++ b/lib/geo-point.js @@ -10,7 +10,7 @@ function GeoPoint(data) { } this.lat = data.lat; - this.long = data.long || data.lng; + this.lng = data.lng; } // TODO remove this