上个页面可以使用逆地址解析出具体文字地址
var QQMapWx = require(‘@/utils/qqmap-wx-jssdk.min.js’)
var qqMapSdk = new QQMapWx({
key: ‘’
})
// 逆地理编码函数
reverseGeocode(latitude, longitude) {
// 腾讯地址解析
qqMapSdk.reverseGeocoder(({
location: {
latitude: latitude,
longitude: longitude,
},
success: (res) => {
console.log(‘QQMapWx11’, res)
this.location = res.result.address_component.street
this.pageNo = 1
this.indexList()
},
fail: (error) => {
console.log(error)
}
}))
},
uniapp 使用自定义地图选择位置并进行解析
最新推荐文章于 2025-04-16 20:21:00 发布