This is a JS project to work and get comfortable with the APIs.
This is a weather project where-in initially the user is asked to grant his location permission. Once the user does that, his latitude and longitude are stored using the navigator.geolocation, and these are used to fetch his location's weather using the openweathermap API.
Also the user can choose to search for a city by its name to know its weather, the user entered city name is used to fetch the weather of that city by passing it in the API.
You can check the live demo here.
- One of my major learning in this project is how to use navigator.geolocation and store information using destructuring.
- Furthermore, I learned how to call and fetch data using API(s) and async-await and how to convert that data in json format using the .json().
- Moreover, I learned how to store and retrieve the data from the Session storage.