-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a5bc5b
commit c1f3743
Showing
4 changed files
with
109 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var util = require('util') | ||
, http = require('http') | ||
, geolib = require('geolib'); | ||
|
||
describe('Geolib', function() { | ||
describe('getElevationServer', function() { | ||
it('should getElevation for three points', function(done) { | ||
var coords = [ | ||
{"lat":40.79162,"lng":-111.76560999999998}, | ||
{"lat":40.79938945887229,"lng":-111.76680525603354}, | ||
{"lat":40.80354,"lng":-111.77384999999998} | ||
]; | ||
geolib.getElevation(coords, function (err, result){ | ||
if (err){ | ||
throw new Error("Could not getelevation"); | ||
} else { | ||
Math.floor(results[0].elev).should.be.equal(2211); | ||
Math.floor(results[1].elev).should.be.equal(1995); | ||
Math.floor(results[2].elev).should.be.equal(1978); | ||
} | ||
}); | ||
}); | ||
}); | ||
}); |