May 9, 2011

Transit Routes Now Available for the (Open) Directions API

New data, new services, this is just how we roll! With the latest addition of transit data, developers can now incorporate transit routing into their own mapping application.

Using this service is really no different than directly calling for our driving, walking, or biking directions. Simply changing the routeType to ‘multimodal‘ will prompt MapQuest to begin searching for an optimal route combining pedestrian routes with transit routes.

Because transit data is also time-sensitive, some key parameters outlined on Date/Time Routing Options have been added and are required for the service to return a response. Seen below is an example of a transit route request using the Metro from the oft forgotten about and climbable (!!) Albert Einstein Memorial to the Verizon Center in Washington, DC.

http://open.mapquestapi.com/directions/v1/route?key=YOUR-KEY-HERE&routeType=multimodal&timeType=1&outFormat=xml&from=38.892551,-77.048244&to=38.898137,-77.020928

As documented on the Date/Time Routing Options page, when the value of timeType is set to 1, the current time is sent to generate a transit route. Other options include choosing a certain day of the week and time, or selecting a specific date and time — all of which can have a major impact on the transit route returned.

Don’t forget to also check out the updated Advanced Routing Sample and give our API a test-drive!

Partial screenshot of the Advanced Routing Sample using the Open Directions API

Currently, transit directions are available for six major metropolitan areas: New York, Chicago, Washington, D.C., Boston, Philadelphia and San Francisco in both our Directions API and the Open Directions API. Please feel free to provide feedback on our forums or @MapQuestTech while we look to increase the amount of transit data available and improve the service itself.

Happy Transit Commuting!

Follow @MapQuestTech on Twitter

MapQuest DevBlog RSS

Want to stay updated on all the latest advances? Subscribe to our blog feed and be among the first to receive the news!