我正在调用矩阵路由API:
并获取41698的距离,以及routeId(如果我想查看此路线的更多详细信息):
{"summary":{"distance":41698,"travelTime":2471,"costFactor":2511,"routeId":"AIEACAAAAB4AAABaAAAAmgAAAJ8AAAB42mOYz8DAxMQABKeCNzquODYrlgEKcibcFHVjFLJh+P8fIvBhPwMS4ALiyy4nXJgY3hWsd5TecQauMfvCHdHzvHg1XmB8spIRaDFccMeSjE9TQQxFB6YGhhRGCUd/JgMQv4EJADjbIRoCEs8U"}}
然后我用得到的routeId调用get getroute:
现在我的距离是38650:
"summary":{"distance":38650,"trafficTime":5066,"baseTime":2401,"flags":["tunnel","motorway","builtUpArea"],"text":"The trip takes <span class=\"length\">38.7 km</span> and <span class=\"time\">40 mins</span>.","travelTime":2401,"_type":"RouteSummaryType"}}
这是预期的行为吗?为什么?
答案 0 :(得分:1)
MxN矩阵路由和1xN路由没有使用相同的算法,因此您不会获得完全相同的结果。 矩阵路由正在做一些局部“简化”,以便更快地计算整个矩阵。