所有谷歌地图使用mode = transit的方向Web服务API请求返回INVALID_REQUEST [英] ALL google maps Directions web service API requests with mode=transit return INVALID_REQUEST
问题描述
以下是几个网址,用于返回步行或驾车的结果,但不包括过境(即,更改模式为步行或驾驶,并且您会看到结果)
a href =http://maps.googleapis.com/maps/api/directions/json?origin=EC3N4AB&destination=EC4M8AD&sensor=false&mode=transit =nofollow> http:// maps。 googleapis.com/maps/api/directions/json?origin=EC3N4AB&destination=EC4M8AD&sensor=false&mode=transit我不能用mode = transit获得单个响应。请注意,第二个URL直接来自API文档
其他人注意到同样的事情?
对不起。它不是全球性的东西
它不是全球性问题。谷歌将departure_time或arrival_time作为必填字段。这是他们的API的最近更改。
感谢您的帮助
Here are a few URLs that return results with walking or driving but not with transit (i.e., change mode to walking or driving and you will see results)
I cant get a single response with mode=transit. Notice that the second URL is straight from API documentation
Anyone else noticing the same thing?
Sorry. Its not the global thing
E.g, this doesnt work: http://maps.googleapis.com/maps/api/directions/json?origin=san+francisco&destination=seattle&sensor=false&mode=transit
But, this does again: http://maps.googleapis.com/maps/api/directions/json?origin=san+francisco&destination=seattle&sensor=false&mode=transit&departure_time=1343376768
Its not the global issue. Its that google made departure_time or arrival_time as a mandatory field. This is a recent change to their API.
Thanks for all your help
这篇关于所有谷歌地图使用mode = transit的方向Web服务API请求返回INVALID_REQUEST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!