百度地经纬度转高德地经纬度,高德经纬度转地址

2022年 10月 20日 发表评论
腾讯云正在大促:点击直达 阿里云超级红包:点击领取
免费/便宜/高性价比服务器汇总入口(已更新):点击这里了解

此方法是从高德地图安卓版SDK中抽取的,经测试确保转换结果和鲜艳的野狼的api结果一致。

show u the code

public static double[] baidu2AMap(double lat, double lon) { try { if (lat != 0 && lon != 0) { double var4 = 0.006401062D; double var6 = 0.0060424805D; double[] var2 = null; for (int var3 = 0; var3 < 2; ++var3) { var2 = new double[2]; double var16 = lon - var4; double var18 = lat - var6; double[] var29 = new double[2]; double var24 = Math.cos(b(var16) + Math.atan2(var18, var16)) * (a(var18) + Math.sqrt(var16 * var16 + var18 * var18)) + 0.0065D; double var26 = Math.sin(b(var16) + Math.atan2(var18, var16)) * (a(var18) + Math.sqrt(var16 * var16 + var18 * var18)) + 0.006D; var29[1] = (c(var24)); var29[0] = (c(var26)); var2[1] = (c(lon + var16 - var29[1])); var2[0] = (c(lat + var18 - var29[0])); var4 = lon - var2[1]; var6 = lat - var2[0]; } return var2; } } catch (Throwable var28) { // ll.a(var28, ">

小咸鱼

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: