gpt4 book ai didi

javascript - HERE 映射 javascript API 多个航点

转载 作者:行者123 更新时间:2023-12-04 09:09:35 25 4
gpt4 key购买 nike

<分区>

我正在使用 Here maps Javascript API。如何以编程方式添加多个航点?我试过这个:

  var via = new Array();
var len = waypoints.length-1;
for(var i = 1; i < waypoints.length-1; i++){
via.push("waypoint" + i + ":" + waypoints[i][0] + "," + waypoints[i][1] + ",");
//console.log(waypnts);
}
console.log(via);
var router = platform.getRoutingService(),
routeRequestParams = {
mode: 'fastest;truck;',
grossWeight: '40',
height: '4.0',
width: '2.55',
length: '18.25',
axleCount: '5',
excludecountries: 'CHE',
representation: 'display',
alternatives: '3',
routeattributes : 'waypoints,summary,legs',
maneuverattributes: 'direction,action',
//RouteRepresentationModeType:'dragNDrop',
start:waypoints[0][0] + "," + waypoints[0][1],

destination:waypoints[len][0] + "," + waypoints[len][1]
};

我尝试将变量 via 添加到 routeRequestParams 但没有成功。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com