在这里,如果我们将2个特定的航点组合在一起,矩阵路由返回失败。

问题描述 投票:0回答:1

我们向矩阵(7.2版本)提出请求,但当我们将一些航点和其他航点结合起来时,出现了失败。这个请求返回两个航点的响应时间。

请求:请求

https://matrix.route.api.here.com/routing/7.2/calculatematrix.json?app_id=[APP_ID]&app_code=[APP_CODE]&start0=53.749313,-107.732895&destination0=49.52757,-115.75541&destination1=50.47252,-104.57122&mode=shortest;car;traffic:enabled;&summaryAttributes=tt,di

响应时间:

{
    "response": {
        "metaInfo": {
            "timestamp": "2020-04-30T13:36:03Z",
            "mapVersion": "8.30.108.151",
            "moduleVersion": "7.2.202017-6962",
            "interfaceVersion": "2.6.76",
            "availableMapVersion": ["8.30.108.151"]
        },
        "matrixEntry": [{
            "startIndex": 0,
            "destinationIndex": 0,
            "summary": {
                "distance": 1070433,
                "travelTime": 48713,
                "costFactor": 326105
            }
        }, {
            "startIndex": 0,
            "destinationIndex": 1,
            "summary": {
                "distance": 487523,
                "travelTime": 19223,
                "costFactor": 147460
            }
        }]
    }
}

如果我们改变第二个航点,第一个航点的路由就会返回一个失败,而不是时间和距离。

请求:响应:如果我们改变第二个航点,第一个航点的路由会返回一个失败而不是时间和距离。

https://matrix.route.api.here.com/routing/7.2/calculatematrix.json?app_id=[APP_ID]&app_code=[APP_CODE]&start0=53.749313,-107.732895&destination0=49.52757,-115.75541&destination1=51.23123,-102.47058&mode=shortest;car;traffic:enabled;&summaryAttributes=tt,di

响应:

{
    "response": {
        "metaInfo": {
            "timestamp": "2020-04-30T13:52:00Z",
            "mapVersion": "8.30.108.151",
            "moduleVersion": "7.2.202017-6962",
            "interfaceVersion": "2.6.76",
            "availableMapVersion": ["8.30.108.151"]
        },
        "matrixEntry": [{
            "startIndex": 0,
            "destinationIndex": 0,
            "status": "failed"
        }, {
            "startIndex": 0,
            "destinationIndex": 1,
            "summary": {
                "distance": 541091,
                "travelTime": 26209,
                "costFactor": 165129
            }
        }]
    }
}

有人知道为什么吗?

here-api
1个回答
0
投票

请试着改成以下模式,它们对汽车配置文件的响应是正确的。然而,本应正常工作的shortest;car模式却返回失败,我们将与内部工程团队进行检查。

https:/matrix.route.api.here.comrouting7.2calculatematrix.json?app_id=xxx&app_code=xxx&start0=geo!53.749313,-107.732895&destination0=geo!49.52757,-115.75541&destination1=geo!51.23123,-102.47058&mode=fastest;car;traffic:enabled。

启用流量。

mode=fastest;car;traffic:enabled(启用)

流量未启用。

mode=fastest;car;traffic:disabled(禁用)

© www.soinside.com 2019 - 2024. All rights reserved.