美国使用此处地图计算通行费
Usa calculate Tolls cost using here maps
使用这个例子https://developer.here.com/documentation/toll-cost/topics/example-tollcost.html
和这里的描述 https://developer.here.com/documentation/toll-cost/topics/resource-tollcost-input-interface.html 试图计算美国道路的通行费
第一次找到付费道路以确保它在路线上 - 在这里找到 https://www.sixt.com/toll-roads/usa/ - 从美国佛罗里达州蓬塔戈尔达到美国佛罗里达州伊斯拉摩拉达
从路由收到两个链接
0: {linkId: "-91500228", mappedPosition: {latitude: 26.9336687, longitude: -82.0531188},…}
1: {linkId: "+897488196", mappedPosition: {latitude: 24.9598652, longitude: -80.5699824},…}
然后申请通行费
https://tce.api.here.com/2/tollcost.json
?app_id=my_app_id
&app_code=my_code
&tollVehicleType=3
&vehicleNumberAxles=2
&emissionType=6
&height=3.5m
&vehicleWeight=10.0t
&limitedWeight=10.0t
&passengersCount=1
&tiresCount=8
&route=-91500228;897488196
&detail=1
响应总是收到:
{"errors":[],"warnings":[{"category":1,"context":"Old response format is deprecated, please use request parameter &rollup"}],"countries":[],"onError":false}
尝试了美国的不同地点,无论如何 - 总是空国家数组
有什么不足请指教,谢谢
这是一个工作示例:
一般是您的请求中缺少参数汇总。无论如何都需要添加这个。除此之外,您还尝试使用具有特定尺寸和重量的卡车在岛屿上计算相当远的路线。在纯 HTTPRest 请求中很难得到一个想法。也许这个演示页面有助于调试此类情况:
使用这个例子https://developer.here.com/documentation/toll-cost/topics/example-tollcost.html 和这里的描述 https://developer.here.com/documentation/toll-cost/topics/resource-tollcost-input-interface.html 试图计算美国道路的通行费 第一次找到付费道路以确保它在路线上 - 在这里找到 https://www.sixt.com/toll-roads/usa/ - 从美国佛罗里达州蓬塔戈尔达到美国佛罗里达州伊斯拉摩拉达
从路由收到两个链接
0: {linkId: "-91500228", mappedPosition: {latitude: 26.9336687, longitude: -82.0531188},…}
1: {linkId: "+897488196", mappedPosition: {latitude: 24.9598652, longitude: -80.5699824},…}
然后申请通行费
https://tce.api.here.com/2/tollcost.json
?app_id=my_app_id
&app_code=my_code
&tollVehicleType=3
&vehicleNumberAxles=2
&emissionType=6
&height=3.5m
&vehicleWeight=10.0t
&limitedWeight=10.0t
&passengersCount=1
&tiresCount=8
&route=-91500228;897488196
&detail=1
响应总是收到:
{"errors":[],"warnings":[{"category":1,"context":"Old response format is deprecated, please use request parameter &rollup"}],"countries":[],"onError":false}
尝试了美国的不同地点,无论如何 - 总是空国家数组
有什么不足请指教,谢谢
这是一个工作示例:
一般是您的请求中缺少参数汇总。无论如何都需要添加这个。除此之外,您还尝试使用具有特定尺寸和重量的卡车在岛屿上计算相当远的路线。在纯 HTTPRest 请求中很难得到一个想法。也许这个演示页面有助于调试此类情况: