点击 openMap() 即可 传经纬度 地名地址
openMap() { // 获取目的地经纬度 let j = '113.953532'; let w = '22.540024'; let obj = this.bMapTransQQMap(Number(j), Number(w)); let address = "高新园"; let name ="高新园地铁站"; uni.openLocation({ longitude: obj.lng, latitude: obj.lat, name: address, address: name, success(res) { console.log(res) }, fail(err) { console.log(err, 'err') } }) }, bMapTransQQMap(lng, lat) { let x_pi = 3.14159265358979324 * 3000.0 / 180.0; let x = lng - 0.0065; let y = lat - 0.006; let z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi); let theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi); let lngs = z * Math.cos(theta); let lats = z * Math.sin(theta); return { lng: lngs, lat: lats } },