Google方向API请求在ios5中无效 [英] Google direction api request invalid in ios5
问题描述
以下是我的要求:
https://maps.googleapis.com/maps/api/directions/json?origin=49.276951,-123.128559&destination=49.277874,-122.912404&mode = transit& sensor = false
结果是:
{
routes:[],
status:INVALID_REQUEST
}
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" }
以前有用,但今天我用它时不起作用。这是为什么?
注意:当我将其更改为mode = walking时,它可以正常工作
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
推荐答案
上述请求有效。我们可以通过添加departure_time参数来解决此问题,因为Google可能会更新方向api并将出发时间设置为强制性参数。
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.
这篇关于Google方向API请求在ios5中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!