xuhy
2026-04-17 4edaaf570a2cd8af8a9c35694a46289cdf9278b3
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
@@ -47,7 +47,7 @@
     * @return
     * @throws Exception
     */
    public RouteVo getDistanceAndTime(LonLatDto start, LonLatDto end,List<String> avoidRoads,String fenceId,Integer routePlanRule, List<HistoryPointDto> history)  {
    public RouteVo getDistanceAndTime(LonLatDto start, LonLatDto end,ArrayList<JSONObject> avoidRoads,String fenceId,Integer routePlanRule, List<HistoryPointDto> history)  {
        RouteVo routeVo = new RouteVo();
        String url = "https://tsapi.amap.com/v1/route/price?key=" + key + "&extensions=all&start=" + start.getLongitude() + "," + start.getLatitude();
@@ -57,11 +57,7 @@
        params.put("end", end.getLongitude() + "," + end.getLatitude());
        params.put("routeUserType", 2);
        if (avoidRoads != null && !avoidRoads.isEmpty()) {
            JSONArray avoidPolygons = new JSONArray();
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("coordinates", avoidRoads);
            avoidPolygons.add(jsonObject);
            params.put("avoidPolygons", avoidPolygons);
            params.put("avoidPolygons", avoidRoads);
        }
        if (routePlanRule != null) {
            params.put("strategy", routePlanRule);