I moved to Brighton, MA at the beginning of September and as a result I no longer have much use for a car. I live right on the B line which, as a supplement to my old size 11s, gets me everywhere I need to be.
Since I’m new to the area, I have been using Google Maps a lot. While it’s helpful to gain a general idea of where things are, it was becoming a frequent annoyance to cut and paste the start and end addresses from the Google Maps directions page into the MBTA Trip Planner.
The MBTA trip planner form submits
Luckily, before I got too deep into debugging the script, I noticed that the MBTA trip planner would also accept
GET form data. This allowed me to implement a version that weighs in at just 3 lines.
Both versions of the script are posted below. On a related note, I can wholeheartedly recommend the Bookmarklet Builder from subsimple.com to compress the script for use as a bookmarklet.
GMaps2MBTA for Safari and Chrome
GMaps2MBTA for Firefox and IE