The Real-Time Bus Tracker is a web application that leverages HTML, CSS, and JavaScript to visualize the movement of a bus between MIT and Harvard. Users can interact with the map, and a dynamic bus icon updates its position in real-time along the predefined route. The application enhances the user experience with a user-friendly button, inviting users to effortlessly track the bus's journey between two iconic locations.
Improvements
Updates made to enhance user experience and functionality:
- code was separated into functions for readability
- set the height of the map to be 100% of the viewpoint height
- button styling
- cursor pointer
- button hover animation
- moved script tags to the end of the section
- updated button label
- created a line layer to visually represent the bus route on the map
How to Run
To run the Real-Time Bus Tracker on your machine, follow these steps:
- Clone the repo: git clone https://github.com/marialee222/real-time-bus-tracker.git
- Open the project directory: cd real-time-bus-tracker
- Get a Mapbox Access Token by visiting Mapbox and signing up for an account.
- Create a new access token in your Mapbox account dashboard.
- Replace Access Token in mapanimation.js with your new access token.
- Open index.html in your web browser. Explore the Real-Time Bus Tracker!