// 起终点位置let startPt: RouteNodeInfo = new RouteNodeInfo()let endPt: RouteNodeInfo = new RouteNodeInfo()startPt.location = new LatLng(40.048241,116.296165)endPt.location = new LatLng(40.04721,116.316372)// 构造 RoutePlanOption ,设置起终点let param: RoutePlanOption = new RoutePlanOption().startNodeInfo(startPt).endNodeInfo(endPt)
service.routePlanService().routePlanWithRouteNode(param,new Object({//引擎开始路线规划onRoutePlanStart: () => {},// 正常规划成功onRoutePlanSuccess: () => {// 展示路线service.routePlanService().displayRoutePlanResult()},// 正常规划失败onRoutePlanFail: (error: RoutePlanError) => {}}) as IRoutePlanListener)
上一篇
下一篇
本篇文章对您是否有帮助?