From 4edaaf570a2cd8af8a9c35694a46289cdf9278b3 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期五, 17 四月 2026 11:58:16 +0800
Subject: [PATCH] Merge branch '1.0' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi into 1.0

---
 xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
index 34fc36d..a776845 100644
--- a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
+++ b/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);

--
Gitblit v1.7.1