I have searched the documentation in Google Directions API, and also looked around online and cannot find an answer to my conundrum. My agency has developed an API to find the latest possible departure between origins and destinations using transit, and there are a few which are returning "No_Result" errors. However, I am able to return results when I search Google Maps manually.
My Google Directions API program sends out the following query:
which returns:
{
"available_travel_modes" : [ "DRIVING", "BICYCLING", "WALKING" ],
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJ7VtqLK7d5okR-bTUfKuHVpo",
"types" : [ "street_address" ]
},
{
"geocoder_status" : "OK",
"place_id" : "ChIJxwHLSqzb5okR1rrjYhcDvkc",
"types" : [ "premise" ]
}
],
"routes" : [],
"status" : "ZERO_RESULTS"
}
However, when I query manually using Google maps, I am able to return a result via transit.
I have double-checked any obvious mistakes (like using "Rd" instead of "St", or inputting an address that doesn't exist) but have not found any. I have also changed the departure/arrival times in the program, with no luck.
The error message looks like it is indicating that MODE as TRANSIT is not an option between that origin/destination pair - but then the manual interface doesn't have an issue.
Does anyone know why Google Maps might be rejecting the API query, but not the manual query? Or any resources to help figure out this problem? Thanks!!