Hi folks! How are yall? Are there any free weather APIs that one can use instead of the one that Free Code Camp provides that only displays a static weather result per Shunzeji?? Thanks for the help in advance!
How can I integrate this into my code to get an entire information readout…city, windspeed, etc…?
if ("geolocation" in navigator) {
// check if geolocation is supported/enabled on current browser
navigator.geolocation.getCurrentPosition(
function success(position) {
// for when getting location is a success
console.log('latitude', position.coords.latitude,
'longitude', position.coords.longitude);
},
function error(error_message) {
// for when getting location results in an error
console.error('An error has occured while retrieving
location', error_message)
}
});
} else {
// geolocation is not supported
// get your location some other way
console.log('geolocation is not enabled on this browser')
}