【发布时间】:2015-12-24 11:26:12
【问题描述】:
您好,我正在使用 mapquest api 在应用程序中显示从源到目的地的距离
问题:
我正在向 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."]}}
我认为这是错误的,因为应该返回前两个位置之间的距离。
请建议可以为此做些什么?
【问题讨论】:
标签: mapquest