2

Here is my request: https://maps.googleapis.com/maps/api/directions/json?origin=49.276951,-123.128559&destination=49.277874,-122.912404&mode=transit&sensor=false The result is: { "routes" : [], "status" : "INVALID_REQUEST" }

It worked before, but it does not work when i used it today. why is that? Note: it works fine when i change it to mode=walking

Tomy
  • 31
  • 4
  • Same thing happened to me. This link used to work until today: http://maps.googleapis.com/maps/api/directions/json?sensor=false&mode=transit&destination=40.742160,-73.987989&origin=40.762940,-73.988520 – Joseph Lin Jul 25 '12 at 21:26
  • then i am sure that its not my problem! thank you Joseph. – Tomy Jul 25 '12 at 22:50

2 Answers2

1

https://maps.googleapis.com/maps/api/directions/json?origin=49.276951,-123.128559&destination=49.261566,-123.138399&mode=transit&sensor=false&departure_time=1346197500

The above request works. We can solve this problem by adding departure_time parameter since Google may updated the direction api and set departure time as a mandatory parameter.

Tomy
  • 31
  • 4
0

The problem here is probably that there is no public transit that can take you from your origin to your destination, thus the invalid request..

Daniel
  • 22,363
  • 9
  • 64
  • 71