将经纬度转换为详细结构化的地址,且返回附近周边的POI、AOI信息。
阿里云逆地理编码里有示例代码,免费的简单方便,由于导错了一个包耽搁了时间,记录下来以防止以后再有类似错误
package com.ali.sms;
import java.util.HashMap;
import java.util.Map;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;
public class Test1 {
public static void main(String[] args) {
String host = "https://regeo.market.alicloudapi.com";
String path = "/v3/geocode/regeo";
String method = "GET";
String appcode = "你自己的AppCode";
Map<String, String> headers = new HashMap<String, String>();
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
headers.put("Authorization", "APPCODE " + appcode);
Map<String, String> querys = new HashMap<String, String>();
querys.put("batch", "false");//可不写
querys.put(&