gmaps icon indicating copy to clipboard operation
gmaps copied to clipboard

Add TransitOption as an argument in directions_layer

Open iontom opened this issue 7 years ago • 1 comments

https://developers.google.com/maps/documentation/javascript/distancematrix

For Transit:

{
  arrivalTime: Date,
  departureTime: Date,
  modes: [transitMode1, transitMode2]
  routingPreference: TransitRoutePreference
}

For Driving:

{
  origins: [{lat: 55.93, lng: -3.118}, 'Greenwich, England'],
  destinations: ['Stockholm, Sweden', {lat: 50.087, lng: 14.421}],
  travelMode: 'DRIVING',
  drivingOptions: {
    departureTime: new Date(Date.now() + N),  // for the time N milliseconds from now.
    trafficModel: 'optimistic'
  }
}

iontom avatar May 13 '18 05:05 iontom

I agree that that would be a nice addition. PRs welcome!

pbugnion avatar May 13 '18 07:05 pbugnion