通过js简单确决百度地图坐标不够精确的问题
百度坐标转化腾讯地图坐标
hanldeCoordinateConversion(lat, lon) {
let xPi = Math.PI * 3000 / 180;
let x = lon;
let y = lat;
let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * xPi);
let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * xPi);
this.txLon = z * Math.cos(theta) + 0.0065;
this.txLat = z * Math.sin(theta) + 0.006;
},
以上方法简单实用!!!