npm install node-distance-google --save
var googleApiDistance = require('google-distance')
var client = googleApiDistance.createClient()
var params = {
origins:'37.430622, -122.138174',
destinations:'37.432599, -122.136221',
mode: 'walk'
}
client.getDistance(params)
.then((data) => {
// do stuff
}).catch(err => console.log(err))
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request