Created
March 8, 2015 23:28
-
-
Save piuggi/b4ca3c8cfada194756f6 to your computer and use it in GitHub Desktop.
Get Location and Weather by Lat Long
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
var geocoderProvider = 'google'; | |
var httpAdapter = 'http'; | |
var geocoder = require('node-geocoder').getGeocoder(geocoderProvider, httpAdapter, {}); | |
var weather = require('weather-js'); | |
geocoder.reverse(40.7208628, -74.0455604, function(err, res) { | |
console.log(res); | |
weather.find({search: res[0].zipcode, degreeType: 'F'}, function(err, result) { | |
if(err) console.log(err); | |
console.log(JSON.stringify(result, null, 2)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment