puzhibing
2023-08-16 d5b3e5a413bcfccba294793ee093722f31b2448a
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/util/GaoDe/MapUtil.java
@@ -14,8 +14,6 @@
import java.util.List;
import java.util.Map;
import static com.supersavedriving.driver.modular.system.util.GaoDe.MapConfig.key;
/**
* 地图工具类
* @author pzb
@@ -37,7 +35,7 @@
     */
    public static Map<String, String> getDistance(String origins, String destination, Integer type){
        try {
            String url = "https://restapi.amap.com/v3/distance?key=" + key + "&origins=" + origins + "&destination=" + destination +
            String url = "https://restapi.amap.com/v3/distance?key=" + MapConfig.key + "&origins=" + origins + "&destination=" + destination +
                    "&type=" + type;
            HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json");
            if(httpResult.getCode() != 200){
@@ -71,7 +69,7 @@
     */
    public static List<String> geocoding(String address){
        try {
            String url = "https://restapi.amap.com/v3/geocode/geo?key=" + key + "&output=JSON&address=" + address;
            String url = "https://restapi.amap.com/v3/geocode/geo?key=" + MapConfig.key + "&output=JSON&address=" + address;
            HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json");
            if(httpResult.getCode() != 200){
                return null;
@@ -104,7 +102,7 @@
     */
    public static District geocode(String lon, String lan) {
        try {
            String url = "https://restapi.amap.com/v3/geocode/regeo?key=" + key + "&location=" + lon + "," + lan;
            String url = "https://restapi.amap.com/v3/geocode/regeo?key=" + MapConfig.key + "&location=" + lon + "," + lan;
            HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json");
            if(httpResult.getCode() != 200){
                return null;