| | |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.net.URLConnection; |
| | | import java.net.URLEncoder; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | // |
| | | // |
| | | //requestGetAK(URL, params); |
| | | JSONArray jsonArray = searchLocation("天安门", "39.909,116.39742"); |
| | | System.out.println(jsonArray.size()); |
| | | System.out.println(geoconv("116.390838,39.916245").toJSONString()); |
| | | } |
| | | |
| | |
| | | } |
| | | return jsonArray; |
| | | } |
| | | |
| | | |
| | | |
| | | public static JSONObject requestGetAKObject(String strUrl, Map<String, String> param) throws Exception { |
| | | if (strUrl == null || strUrl.length() <= 0 || param == null || param.size() <= 0) { |
| | | return new JSONObject(); |