1.高德开放平台申请appkey===https://lbs.amap.com/
关于如何生成Android证书请查看===https://blog.csdn.net/weixin_43778556/article/details/112533566
2.填写高德开放平台申请的key
3.代码
var that = this
uni.chooseLocation({
success: function(res) {
console.log('==='+JSON.stringify(res))
that.str_chu = res.name
// this.str_mu=res.address
that.str_chu_latitude = res.latitude
that.str_chu_longitude = res.longitude
that.paotui_chu = res.longitude + ',' + res.latitude
// console.log('位置名称:' + res.name);
// console.log('详细地址:' + res.address);
console.log('纬度:' + that.str_chu_latitude);
console.log('经度:' + that.str_chu_longitude);
// console.log('出发地=='+that.str_chu)
}
});
4.APP打包(打包需要打自定义包地图选点才好用)