0

目前我指的是这个文档(https://developer.here.com/documentation/routing-api/api-reference-swagger.html),并且能够通过提供路由参数来发送计算路由的请求,如下所示:

// Get an instance of the routing service version 8:
var router = platform.getRoutingService(null, 8);

//routing parameters
var routingParameters = {
        'routingMode': 'fast',
        'transportMode': 'car',
        // The start point of the route:
        'origin': '52.550028,13.302349',
        // The end point of the route:
        'destination': '58.553272,13.305195',
        // Include the route shape in the response
        'return': 'polyline,typicalDuration,summary,routeHandle'
    };

// Call calculateRoute() with the routing parameters,
// the callback (onResult) and an error callback function (called if a
// communication error occurs):
router.calculateRoute(routingParameters, onResult,
  function(error) {
    alert(error.message);
  });

但是,如果我需要使用路线句柄来更新已计算路线的交通信息,我需要如何请求?我们是否有任何使用路由句柄的方法,例如使用 calculateRoute 方法来计算新路由。

4

0 回答 0