Added Weather and greetings examples

This commit is contained in:
Rod 2020-08-14 13:20:06 -05:00
parent 6e90644faf
commit 8b70add01d
2 changed files with 5 additions and 3 deletions

View File

@ -2,7 +2,7 @@ var today = new Date();
var Hr = today.getHours();
// Here you can change the greetings and your name
var name = '[Name]';
var name = 'John Doe';
var lateTxt = 'Go to Sleep! ';
var morningTxt = 'Good morning! ';
var afterTxt = 'Good afternoon ';

View File

@ -9,6 +9,7 @@ weather.temperature = {
};
const KELVIN = 273;
// You can use your own key for the Weather
const key = 'aa5b0a76dfbf87441928fb3cc32d3d69';
// Set Position function
@ -16,8 +17,9 @@ setPosition();
function setPosition(position) {
// Here you can change your position
let latitude = 21.0265;
let longitude = -89.6765;
// You can use https://www.latlong.net/ to get it! (I use San Francisco as an example)
let latitude = 37.774929;
let longitude = -122.419418;
getWeather(latitude, longitude);
}