您好我使用Mapquest服務API來顯示應用程序從源到目的地的距離Mapquest服務路由矩陣響應
問題:
我送下面請求MAPQUEST得到的距離
{ "locations":[ "40.2336,-111.6475", "33.621227,-111.917229","30.688181,76.706238"],
"options":{ "allToAll":true, "unit":"k", "doReverseGeocode":false,"manyToOne":true } }
現在在這種情況下,距離可以從第一緯度長度計算到第二緯度長度,因爲兩者都是美國地址,但是第一個位置和第三位置之間的距離無法計算,因爲第三個位置是印度位置。
現在我得到的響應是
{"route":{"routeError":{"message":"","errorCode":0}},"info":{"copyright":
{"text":"© 2015 MapQuest, Inc.","imageUrl":"http://api.mqcdn.com/res/mqlogo.gif",
"imageAltText":"© 2015 MapQuest, Inc."},"statuscode":400,
"messages":["We are unable to route with the given locations."]}}
我估計是錯誤的,因爲首先兩兩地之間的距離應返回。
請建議可以爲此做些什麼?