First, you need to go to Baidu or Gaode official website to apply for ak.
wx.getLocation(OBJECT)
Get current latitude and longitude
wx.chooseLocation(Object object)
Open map and select location
wx.getLocation({
type: "wgs84",
success(res) {
wx.chooseLocation({
latitude: res.latitude,
longitude: res.longitude,
success: function(data){
console.log(data)
}
})
}
})
See the original text here: Address link