wx.chooseLocation(Object object)
wxml
<view bindtap="getLocalPath">
位置信息:{{localPath}}
</view>
.js
data: {
localPath:"请选择位置"
},
getLocalPath:function () {
var that=this;
wx.chooseLocation({
success:function (res) {
console.log(res);
that.setData({localPath:res.address})
},
fail:function (res) {
console.log(res);
}
})
},