Skip to main content

Google Maps APIs gain improved transit directions for Android developers

Google today released a set of improvements to the Google Maps APIs for developers looking to use transit directions in their Android apps. Specifically, users can now receive fare info where available and make use of the same mode and routing options as the Google Maps app.

Transit directions were added to the Google Maps Distance Matrix API and the Distance Matrix service in the Google Maps JavaScript API V3 for developers, whereas previously they were only available in the Google Maps Directions API and the Directions service.

Android users shouldn’t expect any immediate changes across third-party apps until developers take advantage of these new features, but eventually more apps that integrate Google Maps will provide improved transit mode and routing preferences and allow for better trip planning.

The full changelog:

  • Transit is now available in the Google Maps Distance Matrix API and theDistance Matrix service in the Google Maps JavaScript API v3. Previously it was only available in the Google Maps Directions API and the Directions service.
  • Transit directions will now return fare information where available, same as the Google Maps Android app. In the Distance Matrix API, this enables developers to find routes that minimize either the travel time or the fare.
  • Transit directions now accept transit options, same as the Google Maps Android app. Options include mode preferences (transit_mode=train|tram|subway|bus) as well as routing preferences (transit_routing_preference=less_walking or fewer_transfers).
  • Developers can now set departure_time=now in Directions API queries instead of specifying a timestamp. The departure_time parameter is now optional and will default to departure_time=now if not specified.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications