For the past month, I have been working on a method for the real-time tracking of the buses within Cambridge.
I used the website MapTiler for the base mapping the Open Bus Data website in order to get the real-time location of buses. I also uploaded a GeoJSON file with the bus stop locations, as these would normally be static and not require frequent updates. I had to create a proxy file in order to access the data due to CORS issues.
Each bus icon represents the real-time location of a bus, with the route number in a colour beneath the icon. Each route number has a different colour allowing users to easily differentiate between the routes. I have also used the lollipop icon in order to show the location of the bus stops.
This method also allows users to search for buses nearest to their location by clicking on the icon below.In the future I will add popups for the bus stops showing their name, and will try to get the colour of the buses to match the colour of the text beneath.
The full website can be found here. As always please let me know your thoughts, and feedback.