如何为我的 getroute 请求获取 RouteId?

How to get RouteId for my getroute request?

我在 HERE 上有免费增值计划,我正在使用路由 REST 服务。

当我使用 getroute 请求 https://route.api.here.com/routing/7.2/getroute.json?app_id=APPID&app_code=APPCODE&waypoint0=geo!47.4183889,9.7318127&waypoint1=geo!47.4315312,9.8954753&mode=fastest;car;traffic:disabled 请求两个路点之间的详细汽车路线时,我必须设置 routeId 参数,否则我会收到错误 "Parameter \"routeid\" is not specified ".

如何获取我的 routeId?我预计我会收到带有计算路由结果的它,但它不在 json 响应中。

getRoute request is used to retrieve more information about a previously calculated route. So, routeId must be available to you as part of your earlier calculateRoute response. For getting the routeId, you must specify routeAttributes to routeId "&routeattributes=ri". Please see the documentation here (routeAttributes) -