关于坐标说明:
详情可看:
http://lbsyun.baidu.com/index.php?title=jspopular/guide/coorinfo
在百度地图API中,提供了一个坐标转换的API,需要申请ak
http://lbsyun.baidu.com/index.php?title=webapi/guide/changeposition
使用如下:
Map<String, String> paramMap =new HashMap<String, String>();
paramMap.put("coords", "114.566289,38.23269");//普通经纬度
paramMap.put("ak", "自行申请");
paramMap.put("to", "6");//代表bd09mc(百度米制经纬度坐标,即墨卡托坐标);
String post = HttpUtil.sendPost("http://api.map.baidu.com/geoconv/v1/?", paramMap);
System.out.println(post);
输出结果
{"status":0,"result":[{"x":12754969.895087,"y":4586577.2453765}]}