This project integrates Mapbox and the MBTA API to showcase real-time bus locations on an interactive map. The buses' movements are actively monitored and listed in a side panel. Every 15 seconds, markers are strategically placed to trace the route of each bus. Each marker is color-coded based on the bus ID, and timestamps are included for insertion tracking. Additionally, users have the flexibility to toggle visibility for all data on the map or selectively display specific buses by their IDs using the panel.
- Clone the repository to your local machine.
- Open the
index.html
file in your preferred web browser. - Interact with the map using the provided buttons:
- Hide/Show Markers
- List All Buses
- Check Live Updates
- Click the "Live" button to initiate real-time bus tracking. You can pause and restart the tracking as needed while retaining the displayed points.
- Enhance user control with the ability to hide/show specific buses on the map.
- Provide a user-friendly panel for selecting and displaying buses based on their unique IDs.
- Implement real-time updates for instant bus locations on the map.
- Enable detailed route tracking to offer a more comprehensive data visualization experience.