I want to use the Google Transit API in an Android application. But I get data from the service. I used the following options:
http://maps.googleapis.com/maps/api/directions/json?origin=Brooklyn&destination=Queens&sensor=false&departure_time=1343605500&mode=transit
I always get this answer:
{ "routes" : [], "status" : "ZERO_RESULTS" }
I think I'm passing something wrong in any parameters used in the above URL, maybe departure_time is wrong?
departure_time
Can anyone say what needs to be passed to the parameters? Can someone help me find out the URL with parameters that return a value?
You just need to set the departure_time parameter in the future (for example, a few days). From here :
When requesting transit routes, be sure to include either departure_time or arrival_time. Please note that in this example, Departure time is indicated as July 30, 2012 at 09:45. Update the parameter to a point in the future before sending the request.
Try http://maps.googleapis.com/maps/api/directions/json?origin=Brooklyn&destination=Queens&sensor=false&departure_time=1350472557&mode=transit , it works.
Source: https://habr.com/ru/post/1439354/More articles:Conway game of life - javaMaven Site, install TeamCity as a ciManagement system? - teamcityhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1439351/how-to-draw-solutions-to-an-inequality-in-matlab&usg=ALkJrhhiBdlCHnfwmCBGFq_J9mc3PiLTVQLocal folder size limit? - c #Returning label strings in groups of 10, 20, etc. - sqlFindWindow Error - pythonEdit Jtable in an unfocused window - javawhat does cross sign mean in eclipse - javaA new template in Umbraco will not appear in the Templates drop-down list on content pages - content-management-systemGoogle Plus Integration for Profiles - androidAll Articles