| | |
| | | */ |
| | | public Map<String, String> geocode(String lon, String lan) throws Exception{ |
| | | String url = "https://restapi.amap.com/v3/geocode/regeo?key=" + key + "&location=" + lon + "," + lan; |
| | | System.err.println("=========="+lon+"============"+lan); |
| | | |
| | | String forObject = restTemplate.getForObject(url, String.class); |
| | | JSONObject jsonObject = JSON.parseObject(forObject); |
| | | Map<String, String> map = new HashMap<>(); |
| | | System.err.println("=========="+jsonObject); |
| | | |
| | | // gdInterfaceService.saveData("https://restapi.amap.com/v3/geocode/regeo", "经纬度转行政区域"); |
| | | |