public static Map bd_encrypt(double gg_lat, double gg_lon) {
double x = gg_lon, y = gg_lat;
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * Math.PI);
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * Math.PI);
double bd_lon = z * Math.cos(theta) + 0.0065;
double bd_lat = z * Math.sin(theta) + 0.006;
Map map = new HashMap();
map.put("bd_lon", bd_lon);
map.put("bd_lat", bd_lat);
return map;
}
高德地圖座標轉換百度地圖座標-Java
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.