更新高德key
This commit is contained in:
@@ -18,16 +18,12 @@ import java.net.URL;
|
||||
public class GeoMapUtil {
|
||||
|
||||
private static final String AMAP_API_URL = "https://restapi.amap.com/v3/geocode/regeo";
|
||||
private static final String API_KEY = "bdf789122b56e8fd3d4a4410800382a6"; // 替换为你的高德地图API密钥
|
||||
private static final String API_KEY = "2270e9b7e353ee588e133b4fdbc8b7df";
|
||||
|
||||
public static void main(String[] args) {
|
||||
AddressInfo addressInfo = reverseGeoCoding("30.41875", "120.2985");
|
||||
System.out.println(JSONObject.toJSONString(addressInfo));
|
||||
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.41", "120.29")));
|
||||
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.42", "120.30")));
|
||||
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.4", "120.2")));
|
||||
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.5", "120.3")));
|
||||
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.419", "120.299")));
|
||||
}
|
||||
|
||||
public static AddressInfo reverseGeoCoding(String latitude, String longitude) {
|
||||
|
||||
Reference in New Issue
Block a user