This is a simple fitness tracker application that allows users to log and track their running and cycling workouts on a map using the Leaflet library.
Features:
• Workout Logging: Add new workouts (running or cycling) by clicking on the map and inputting workout details (distance, duration, etc.).
• Map Integration: Displays workout markers on the map based on the user’s location.
• Workout Details: View workout data such as pace (for running) or speed (for cycling), as well as elevation and cadence.
• Local Storage: Workouts are saved in local storage, allowing users to retain their data even after refreshing the page.
• Reset Functionality: Clear all workout data and reset the app to its default state.
Technologies & Methods:
• JavaScript (ES6+)
• Class-based structure for organizing Workout, Running, and Cycling objects.
• Geolocation API for obtaining the user’s current position.
• Event handling for user interaction (form submission, map clicks, etc.).
• Leaflet.js
• For rendering an interactive map and placing workout markers.
• LocalStorage API
• Storing workouts persistently across sessions.
• Responsive UI
• Interactive form elements for switching between workout types.
Setup:
1. Clone the repository.
2. Open the index.html file in a browser.
Enjoy tracking your workouts with this simple and effective app!