Browse files

Use lat/lng in geo functions

  • Loading branch information...
1 parent 004f4a5 commit 236d362f3981b37724c74e8ca0c9c5e191f61b79 @jdub committed Feb 18, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/twitter.js
View
12 lib/twitter.js
@@ -899,41 +899,41 @@ Twitter.prototype.geoSearch = function(params, callback) {
return this;
}
-Twitter.prototype.geoSimilarPlaces = function(lat, lon, name, params, callback) {
+Twitter.prototype.geoSimilarPlaces = function(lat, lng, name, params, callback) {
if (typeof params === 'function') {
callback = params;
params = {};
} else if (typeof params !== 'object') {
params = {};
}
- if (typeof lat !== 'number' || typeof lon !== 'number' || !name) {
+ if (typeof lat !== 'number' || typeof lng !== 'number' || !name) {
callback(new Error('FAIL: You must specify latitude, longitude (as numbers) and name.'));
}
var url = '/geo/similar_places.json';
params.lat = lat;
- params.long = lon;
+ params.long = lng;
params.name = name;
this.get(url, params, callback);
return this;
}
-Twitter.prototype.geoReverseGeocode = function(lat, lon, params, callback) {
+Twitter.prototype.geoReverseGeocode = function(lat, lng, params, callback) {
if (typeof params === 'function') {
callback = params;
params = {};
} else if (typeof params !== 'object') {
params = {};
}
- if (typeof lat !== 'number' || typeof lon !== 'number') {
+ if (typeof lat !== 'number' || typeof lng !== 'number') {
callback(new Error('FAIL: You must specify latitude and longitude as numbers.'));
}
var url = '/geo/reverse_geocode.json';
params.lat = lat;
- params.long = lon;
+ params.long = lng;
this.get(url, params, callback);
return this;
}

0 comments on commit 236d362

Please sign in to comment.