From 1632956ff51882192bb01dbfc5a3761482ff4603 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 17 四月 2026 10:34:02 +0800
Subject: [PATCH] 合并线上代码
---
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