是结合百度定位显示的地址 iOS能显示 安卓机不显示 我手里所有的安卓机都不显示
wx.getLocation({
type: ‘wsg84’, //返回可以用于wx.openLocation的经纬度
success: function (res) {
var locationParam = res.latitude + ‘,’ + res.longitude + ‘1’
wx.request({
url: config.apiList.baiduMap,
data: {
ak: config.baiduAK,
location: locationParam,
output: ‘json’,
pois: ‘1’
},
method: ‘GET’,
success: function (res) {
that.setData({
location: {
latitude: res.latitude,
longitude: res.longitude,
name: ‘我的位置’,
desc: res.data.result.formatted_address
},
formatted_address: res.data.result.formatted_address
})
}
})
}
})