Skip to main content

BART Mapping Case Study


The Bay Area Rapid Transit District (BART) is one of the leading transit websites in the United States. As such, it is always trying to improve the functionality that it provides to its end users. One of the most highly used features is the BART QuickPlanner, which provides trip planning between BART stations and also to and from an address to a station using a mapping API. With the recent addition of bicycle routes to Google Maps, BART decided it made sense to switch out the mapping functionality it was using and implement the new Google Map API.


The project was initially scoped to replace the current mapping functionality on the BART website with the new Google Map API, adding the ability to display bicycle routes. After that initial implementation, it was discovered that we could quickly add some additional functionality by allowing free-form entry of addresses, locations, neighborhoods, and businesses which the old mapping technology couldn't easily geocode.


Replacing the mapping API meant first learning the new Google API, determining the best method for calling it, and then implementing it within the server-side and JavaScript code that makes up the BART pages. There are five main pages that display maps on the BART site: QuickPlanner, Find Closest Station, Station Landing pages (static maps), Station Directions, and Station Neighborhood pages.

Using similar logic to what Web Master Designs had developed previously, these pages were converted to use the new Google Map API. The desire was to have the maps display using JavaScript on the client side in order to provide the best functionality (zoom, pan, etc.). The issue with this (for most mapping solutions) is that there is no easy way to print the client-side maps with routing overlays. In order to make this work, and to deal with the situation where someone might have turned off JavaScript, the solution used two "windows" overlaid on top of each other. The first was a static server-side map which would print, or show if JavaScript were disabled, and the second was a client-side interactive map which could be manipulated.

The Neighborhood pages provide users with the ability to find local businesses near a BART station. In the past, the mapping API used a series of categories in a selection list, and people were limited to only selecting one of those categories. With the Google Map API, we were able to open this up, so instead of showing restaurants near a BART station, you can now search for sushi, pizza, coffee shop, or wine bar. This allows for a much better user interface.

Adding in the ability to enter less-structured addresses (e.g. Coit Tower or Fisherman's Wharf) instead of just using actual street addresses involved figuring out the structure of the data that was returned by the Google geocoding engine and then making sure that we used the same results for both the server-side and client-side maps.


The initial rollout of the new Goolge Map API was very well received, with many people commenting on the new functionality and the improved Google maps. The free-form entry was just launched, but the functionality of being able to enter locations and place names has been a requirement from the BART users for a long time. We also simplified the entry so that you could use "SF" instead of just "San Francisco." Google's parsing engine for geo-coding is by far the most comprehensive one we've worked with.

Press Mentions

BART Teams Up with Google for Ultimate Trip Planner (with Bicycle Directions!)

- Mission Mission

BART mapping mentioned on Chains to trains: BART provides bike-friendly directions with Google Maps API Premier

- Google Cloud Blog


Bay Area Rapid Transit (BART) connects the San Francisco peninsula with Oakland, Berkeley, Fremont, Walnut Creek, Dublin/Pleasanton, and other cities in the East Bay. For more than 35 years BART has provided fast, reliable transportation to downtown offices, shopping centers, tourist attractions, entertainment venues, universities, and other destinations for Bay Area residents and visitors alike.