This application displays MBTA (Keolis)
Commuter Rail trains on a Google Map in real time.
The trains transmit their GPS position and trip information, and the MBTA aggregates the data into a publicly available feed. The data are dependent upon the
onboard PTIS equipment; glitches can occur if the PTIS on a train is set incorrectly.
This page will automatically load new train data from the MBTA as they are available. Train position data are typically updated every one to two minutes.
You can move your cursor over a train marker on the map to have an information balloon pop up with detail about that train. (Mobile device users tap on a marker.)
A link in the info balloon lets you view the official MBTA schedule for that line and direction on
A double-click on a marker will zoom in on that train. (Mobile device users double-tap.) When zoomed in, a double-click or double-tap on the marker will instead zoom back out to the region overview.
You can "follow" a train to its destination by any one of four methods:
Click / tap the coach number link in the pop-up info window of a train marker
While following a train, the map will move so that the train you've selected will remain in the center of the map until you stop following it, or until it no longer appears in the data feed.
If red clusters of markers are being displayed, click / tap on the cluster icon to zoom in and see more or all of the trains in that cluster.
(Clusters appear when there are too many trains in one area to reasonably show individual markers.) Marker clusters can be turned off in the options section, number 8.
Also, marker clusters will come and go as you zoom in and out using the standard Google Map navigation methods.
Marker clusters can be quickly toggled on/off by pressing the "Shift" key.
Train position markers can be set to indicate many different things. In the options section (number 4) you can choose to show the
station / stop name, the train speed, early / late, and more.
This web application is able to detect popular mobile devices (for example iPhone and Android) and should display a mobile version of the map when viewed on a handheld device.
It takes about 1 to 2 minutes (from what I have observed) for a train's data update to show up in the public data feed. This means that (for example) a train travelling at 60 MPH could
actually be 2 miles farther down the line than it appears on the map.
Some options can be specified in the page URL, so you can bookmark the choice for returning again later. For example,
this link will show you
one of the newest train coaches #1800 which was just put into service in April 2013. Another example is
this link which is
train 160, an inbound weekday AM trip from Newburyport.
You can also bookmark links to show one of the 12 lines, or the complete North side or South side:
Page scrolling note: In most web browsers, the normal page scrolling movements up or down using a mouse wheel or trackpad (or page up / page down keys) are interpreted by Google Maps to be
a Zoom In / Zoom Out or map movement action. If you want to scroll this entire web page up or down you need to first position the cursor on the white space outside the Google Map pane. Also
a spacebar press should scroll the entire page down in most browsers. iPhone users can scroll this page up & down by dragging the white borders on the left and right of the map.
This application is designed to be a mapping and visualization tool for those interested in railroad operations. Although I didn't design this to be an application for daily commuters,
it can be used for trip prediction with great success. I do in fact use this for my own commute, to and from Boston, five days a week!
As an option for commuters who want to know about just a few specific daily trains I highly recommend t-on-time.com!
To do: Get the station labels KML layer updated with useful links to station info, instead of the links to massgis.state.ma.us
Bug: Have to account for the "Terrain" map which doesn't allow such close-in zooming as the other map types.
It makes the marker clicking not work properly because the zooming can't happen as expected right now!