我试图通过提供航点来使用谷歌方向 api 找到优化的路线。以下是我使用的航点:LHR 第一个航点:Hounslow 第二个航点:哈灵顿
当我尝试使用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"
}
我得到了错误的回应,这表明我将 LHR 带到 Hounslow 和 harlingston。我不知道我提出的要求有什么问题。任何帮助都是非常可观的。