Permalink
Browse files

efffff

  • Loading branch information...
1 parent 2b25f51 commit 4a5bc5b46e1c3f778ba3843a718432122a119e16 @regality regality committed Mar 8, 2012
Showing with 8 additions and 8 deletions.
  1. +7 −7 geolib.js
  2. +1 −1 package.json
View
@@ -680,19 +680,19 @@
});
},
- elevationHandler: function(elevationResults, elevationStatus, cb){
+ elevationHandler: function(err, elevationResult, cb){
var latsLngsElevs = [];
- if (elevationStatus == "OK" ) {
- for (var i = 0; i < elevationResults.length; i++) {
+ if (elevationResult.status == "OK" ) {
+ for (var i = 0; i < elevationResult.results.length; i++) {
latsLngsElevs.push({
- "lat":elevationResults[i].location.lat(),
- "lng":elevationResults[i].location.lng(),
- "elev":elevationResults[i].elevation
+ "lat":elevationResult.results[i].location.lat,
+ "lng":elevationResult.results[i].location.lng,
+ "elev":elevationResult.results[i].elevation
});
}
cb(null, latsLngsElevs);
} else {
- cb(new Error("Could not get elevation using Google's API"), elevationStatus);
+ cb(new Error("Could not get elevation using Google's API"), elevationResult.status);
}
},
View
@@ -13,7 +13,7 @@
"url" : "http://github.com/manuelbieh/geolib.git"
},
"dependencies": {
- "googlemaps": "*"
+ "googlemaps": ">= 0.1.6"
},
"files": ["geolib.js"],
"description": "Growing library to perform geo specific tasks",

0 comments on commit 4a5bc5b

Please sign in to comment.