January 2018
Beginner
658 pages
13h 10m
English
The first argument will be results.latitude, which we defined in app.js on the object. And the second one will be results.longitude:
geocode.geocodeAddress(argv.address, (errorMessage, results) => { if (errorMessage) { console.log(errorMessage); } else { console.log(results.address); weather.getWeather(results.latitude, results.longitude, (errorMessage, weatherResults) => { if (errorMessage) { console.log(errorMessage); } else { console.log(JSON.stringify(weatherResults, undefined, 2)); } }); }});
This is all we need to do to take the data from geocodeAddress and pass it in to getWeather. This will create an application that prints our dynamic weather, the weather for the address in the ...
Read now
Unlock full access