Allow departure_time argument for directions. #27

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

This just allows for the addition of departure_time argument. In the case of mode set to 'transit', if no departure_time is specified google returns an error. e.g. http://maps.googleapis.com/maps/api/directions/json?origin=Brooklyn&destination=Queens&sensor=false&mode=transit returns

{
"routes" : [],
"status" : "INVALID_REQUEST"
}

Where as, http://maps.googleapis.com/maps/api/directions/json?origin=Brooklyn&destination=Queens&sensor=false&departure_time=1343605500&mode=transit returns a proper answer.

Contributor

grobot commented Aug 11, 2013

If it fails with no departure time, can we add in a sane default, like setting departure time to now?

Sure sounds reasonable. I'll fix it
up accordingly?

On Aug 11, 2013, at 11:08 AM, Greg Allan notifications@github.com wrote:

If it fails with no departure time, can we add in a sane default, like
setting departure time to now?


Reply to this email directly or view it on
GitHubhttps://github.com/moshen/node-googlemaps/pull/27#issuecomment-22462110
.

Contributor

grobot commented Aug 12, 2013

Yes. That would be great.

Collaborator

fabriziomoscon commented Jun 24, 2014

@bockmabe I added the arrivalTime as well in this PR https://github.com/moshen/node-googlemaps/pull/43/files
Worth checking, but one of these 2 PR must be merged

@fabriziomoscon, thanks your PR looks good and addresses the requests I got on this one.

bockmabe closed this Jun 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment