Address:


Find the four closest T stations to any address. This utility allows you to locate MBTA stations that are near the address you enter. It uses Google Maps to determine the latitude and longitude of an address and Geo::Distance to calculate distance between points.

Each T station is listed with the straight-line distance between the address you entered and the station. The station name is a link to a Google Map showing driving directions from the address you entered and the station. I found this to be really useful when Tori and I were looking for an apartment in Boston.

The MBTA provides latitude and longitude for each station. The address for each station was generated by reverse-geocode using the geocoder.ca web service. I tweaked addresses manually in cases where the calculated address was not chosen well. Thus, a latitude and longitude and an address don't always describe the same point, and an address is not the official postal address of a station.

Updates

2008-10-13: Updated KML handling. (No more SubAdministrativeArea .)

2007-04-08: Suggestions work again.

2007-04-06: Switched to using latitude and longitude data from the new MBTA site.

2007-04-06: Use Google Maps API Geocoder rather than scraping the main Google Maps application. We lose suggestions, but now I don't have to worry about changes to the inner workings of Google Maps.

2007-02-03: Updated to deal with \x escapes.

2006-10-09: Google updated their marker format again.

2006-08-12: Works again. Google changed how they were encoding quotes in function definitions.

2006-03-31: Works again. Displays Google's "Did you mean:" suggestions if present. Displays text of any errors encountered. Can tell the difference between a local search, a no results situation and an error. Slightly more robust.

© 2004-2006 Sam Hathaway.