我试图通过提供航点来使用谷歌方向 api 找到优化的路线。以下是我使用的航点:LHR 第一个航点:Hounslow 第二个航点:harlington
当我尝试使用http://findthebestroute.com/RouteFinder.html找到优化的轨道时,下面是响应,这是显而易见的答案并且是正确的。
但是现在我想使用谷歌提供的 directionservice api 在我自己的应用程序中执行相同的操作。我已准备好上述请求如下
Request Url: http://maps.googleapis.com/maps/api/directions/json
Request Method: GET
Status Code: 200
Params: {
"origin": "LHR",
"mode": "driving",
"sensor": "false",
"departure_time": "1375789483",
"units": "metric",
"waypoints": "optimize:true|hounslowl|harlington"
}
Run Code Online (Sandbox Code Playgroud)
我得到以下错误的回应,建议我向 Hounslow 和 harlingston 推荐 LHR。我不知道我提出的请求有什么问题。任何帮助都是非常可观的。
