Overview
A real-time weather application that displays current weather conditions based on your geolocation.
Features
Automatic location detection using browser geolocation
Real-time weather data display
Temperature unit toggle (Celsius/Fahrenheit)
Visual weather icons
Location and weather description
How to Use
Allow location access when prompted by your browser
The app will automatically display:
Current temperature
Weather condition (description)
Location (city and country)
Appropriate weather icon
Click on the temperature to toggle between Celsius and Fahrenheit
Data Displayed
Current temperature (in Celsius by default)
Weather description (e.g., "clear sky", "rainy")
Location information (city and country)
Visual weather icon representing current conditions
Requirements
Modern web browser with geolocation support
Internet connection
Location services enabled
Error Handling
Shows notification if:
Browser doesn't support geolocation
User denies location access
Location services are unavailable
API Information
Uses OpenWeatherMap API
Automatically converts Kelvin to Celsius
Running the App
Simply open the HTML file containing this JavaScript in your browser and allow location access when prompted.
Stay informed about the weather! ☀️🌧️❄️