puzhibing
2026-03-13 d4f8d30d1c6e4397dbfbdbb759cc66132913dd53
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
@@ -7,6 +7,7 @@
import com.xiaopeng.api.vo.operation.RouteVo;
import com.xiaopeng.common.core.utils.HttpUtils;
import com.xiaopeng.map.mangodb.service.XpGeoFencingPolygonService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
@@ -21,6 +22,7 @@
/**
 * 高德地图的地理编码工具类
 */
@Slf4j
@Component
@Lazy
public class GDMapGeocodingUtil {
@@ -252,10 +254,10 @@
        if(routePlanRule!=null){
            params.put("strategy", routePlanRule);
        }
        log.info("高德地图接口:{}", url);
        log.info("高德地图参数:{}", params);
        String post = HttpUtils.post(url, JSON.toJSONString(params));
        System.out.println("高德地图返回结果:"+ post);
//        String forObject = restTemplate.getForObject(url, String.class, params);
        log.info("高德地图返回结果:"+ post);
        JSONObject jsonObject = JSON.parseObject(post);
        String data = jsonObject.getString("data");
@@ -313,7 +315,7 @@
        params.put("sdkVersion", "9.850.152.3.532");
        params.put("encoderVersion", "5.1");
        String post = HttpUtils.post(url, JSON.toJSONString(params));
        System.out.println("高德地图返回结果:"+ post);
        log.info("高德地图返回结果:"+ post);
        return post;
    }