Google Apps Script

Enum Mode

An enum representing the mode of travel to use when finding directions.


DRIVINGEnumDriving directions via roads.
WALKINGEnumWalking directions via pedestrian paths and sidewalks (where available).
BICYCLINGEnumBicycling directions via bicycle paths and preferred streets (where available).
TRANSITEnumTransit directions via public transit routes (where available). This mode requires that you set either the departure or arrival time.
// Log all available data for a public-transit trip.
 var directions = Maps.newDirectionFinder()
     .setOrigin('The Cloisters, New York, NY')
     .setDestination('JFK airport, New York, NY')
     .setDepart(new Date())
 var route = directions.routes[0];

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.