This project is a modern, user-friendly Weather Application built with JavaScript that provides real-time weather information using the OpenWeatherMap API.
It allows users to quickly check current weather conditions either by entering a city name or by using their current geographic location.
- Search weather by city name
- Displays temperature, humidity, and wind speed
- Mobile responsive
- Clean and modern UI
This application:
- ๐ Retrieves weather data by city name search
- ๐ Retrieves weather data using the userโs current location
- ๐ก๏ธ Displays the current temperature in Celsius
- ๐๏ธ Shows the city name
- โ๏ธ Presents a clear weather description
- ๐ผ๏ธ Displays the official weather icon
โ ๏ธ Handles common errors such as:- Empty city input
- City not found
- Location permission denied
- Network or API issues
-
The user either:
- Enters a city name and clicks the search button
- Or clicks the location button to use browser geolocation
-
The application sends a request to the OpenWeatherMap API.
-
The returned weather data is processed and dynamically displayed on the webpage.
-
If any issue occurs (invalid input, denied permission, or failed request), a clear alert message is shown.
This project demonstrates:
- Integration with an external API
- Use of asynchronous JavaScript (
async/await) - DOM manipulation
- Event handling
- Geolocation API usage
- Basic error handling
This is a real-time weather application that provides accurate and instant weather updates based on user input or current location, offering a clean and interactive user experience.



