latitude() {
this.visible = true,
this.showMapComponent = true
jsonp(`https://apis.map.qq.com/ws/geocoder/v1/`, {//官方接口
output: 'jsonp',
key: 'YTLBZ-MJ732-7FFUY-CKH44-XRQH2-LYFTs',//腾讯地图获取的key
address: this.address//获取输入的位置
}).then((res) => {
const location = res.result.location;
if (location) {
console.log(location)
this.addBidding_Data.Location = location.lng + ',' + location.lat
// this.Model.tencentLongitude = location.lng //经度
// this.Model.tencentLatitude = location.lat //纬度
}
})
},
vue根据输入位置获取经纬度
最新推荐文章于 2024-04-16 15:59:38 发布