百度地图多个途径点规划路线

来源:互联网 发布:java接收json对象数组 编辑:程序博客网 时间:2024/05/30 05:01
直接上代码,直接看就OK了  
 for (int i = 0; i < TuJin_List.size(); i++) {            LatLng lat = new LatLng(TuJin_List.get(i).getLat(), TuJin_List.get(i).getLongit());            nodes.add(PlanNode.withLocation(lat));        }        Log.e("TuJin_List", "TuJin_List=" + TuJin_List.size() + "nodes=" + nodes.size());//        nodes.add(PlanNode.withCityNameAndPlaceName("湖南", "衡阳"));//        nodes.add(PlanNode.withCityNameAndPlaceName("武汉", "武昌"));        // 实际使用中请对起点终点城s市进行正确的设定        mSearch = RoutePlanSearch.newInstance();        mSearch.setOnGetRoutePlanResultListener(this);        mSearch.drivingSearch((new DrivingRoutePlanOption())                .from(stNode).passBy(nodes).to(enNode));
原创粉丝点击