HERE 路由 API - 如何使用 publicTransportTimeTable 模式与多个 waypoints 使用计算路由资源?

HERE Routing API - How to use publicTransportTimeTable mode with multiple waypoints using calculate route resource?

我正在使用 calculateroute 资源来计算多个 waypoints 之间的路线。

https://route.api.here.com/routing/7.2/calculateroute.json?app_id={APP_ID}&app_code={APP_CODE}&waypoint0=-25.4327193,-49.2806026;;0&waypoint1=-25.4392733,-49.2722581;;1&waypoint2=-25.4367652,-49.2833011;;2&waypoint3=-25.4327193,-49.2806026;;3&waypoint4=-25.4327193,-49.2806026;;4&waypoint5=-25.4392733,-49.2722581;;5&departure=2019-09-09T07:10:00-03:00&mode=fastest;car;traffic:disabled;motorway:0&improveFor=distance&language=pt-br&representation=navigation&metricSystem=metric&vehicletype=diesel,5.5

我之前使用出发参数来设置路线的初始日期,但现在,在某些情况下我需要使用到达时间而不是出发时间。我使用的是汽车模式,但是由于 arrival 参数需要 publicTransportTimeTable,所以我这样设置。

https://route.api.here.com/routing/7.2/calculateroute.json?...&mode=fastest;publicTransportTimeTable;motorway:0..

然后return是这个错误信息:"Time Table Transit Routing is only supported for two StopOver waypoints",然后我设置了waypoint0和waypoint5作为 stopOver,其余作为 passThrough,但是,我收到相同的错误。

获取请求

https://route.api.here.com/routing/7.2/calculateroute.json?app_id={APP_ID}&app_code={APP_CODE}&waypoint0=stopOver!-25.4327193,-49.2806026;;0&waypoint1=passThrough!-25.4392733,-49.2722581;;1&waypoint2=passThrough!-25.4367652,-49.2833011;;2&waypoint3=passThrough!-25.4327193,-49.2806026;;3&waypoint4=passThrough!-25.4327193,-49.2806026;;4&waypoint5=stopOver!-25.4392733,-49.2722581;;5&arrival=2019-09-09T07:10:00-03:00&mode=fastest;publicTransportTimeTable;motorway:0&improveFor=distance&language=pt-br&representation=navigation&metricSystem=metric&vehicletype=diesel,5.5

RETURN

{
    "_type": "ns2:RoutingServiceErrorType",
    "type": "ApplicationError",
    "subtype": "InvalidInputData",
    "details": "Time Table Transit Routing is only supported for two StopOver waypoints",
    "additionalData": [
        {
            "key": "waypoint",
            "value": ""
        }
    ],
    "metaInfo": {
        "timestamp": "2019-09-10T13:40:27Z",
        "mapVersion": "8.30.99.156",
        "moduleVersion": "7.2.201935-5091",
        "interfaceVersion": "2.6.68",
        "availableMapVersion": [
            "8.30.99.156"
        ]
    }
}

如文档中所述,当 mode 设置为 publicTransportTimeTable 时,您只能使用 arrival 参数。而且这种路由目前只支持两次中途停留waypoints(waypoint0waypoint1),不支持直通waypoints.