s***@sina.cn
s***@sina.cn
  • 发布:2022-02-10 16:20
  • 更新:2022-02-10 17:19
  • 阅读:714

【报Bug】uni.getLocation 获取不到Address字段,

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Windows 10 专业版 19042.1466

HBuilderX类型: 正式

HBuilderX版本号: 3.3.11

手机系统: Android

手机系统版本号: Android 10

手机厂商: 小米

手机机型: 红米 note 11

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

uni.getLocation({
'type': 'wgs84',
'geocode':'true',
success: function(res) {
console.log(res)
},
});

预期结果:

{
"type": "wgs84",
"altitude": 0,
"latitude": 30.570937,
"longitude": 104.058364,
"speed": 0,
"accuracy": 29,
"errMsg": "getLocation:ok",
address:{
province:''
。。。。。等等
}
}

实际结果:

{
"type": "wgs84",
"altitude": 0,
"latitude": 30.570937,
"longitude": 104.058364,
"speed": 0,
"accuracy": 29,
"errMsg": "getLocation:ok"
}

bug描述:

uni.getLocation({
'type': 'wgs84',
'geocode':'true',
success: function(res) {
console.log(res)
},
});

返回结果
{
"type": "wgs84",
"altitude": 0,
"latitude": 30.570937,
"longitude": 104.058364,
"speed": 0,
"accuracy": 29,
"errMsg": "getLocation:ok"
}

缺少address字段,以前是有的 ,以前是魅族手机上测的,现在魅族手机坏了,换成红米,

2022-02-10 16:20 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

address仅App平台支持(安卓需指定type 为 gcj02 并配置三方定位SDK)

该问题目前已经被锁定, 无法添加新回复