uni-app nvue中uni.getLocation获取当前定位报错

uni-app nvue中uni.getLocation获取当前定位报错

开发环境 版本号 项目创建方式
Mac 12.0.1 HBuilderX

示例代码:

uni.getLocation({
type: 'gcj02',
geocode: true,
success: function(res) {
_this.lat = res.latitude;
_this.lng = res.longitude;
_this.address = res.address.province + res.address.city + res.address
.district + res
.address.street + res.address.streetNum + res.address.poiName;
_this.init();
},
fail: function(err) {
}

操作步骤:

  • 获取定位就出现

预期结果:

  • 正常获取定位信息

实际结果:

  • 获取定位突然报错,之前好用,更新版本后就这样了
{
"errMsg": "getLocation:fail not support WGS84",
"errCode": 18,
"code": 18
}
{
"errMsg": "getLocation:fail not support GCJ02",
"errCode": 18,
"code": 18
}

bug描述:

获取定位突然报错,之前好用,更新版本后就这样了

{
"errMsg": "getLocation:fail not support WGS84",
"errCode": 18,
"code": 18
}
{
"errMsg": "getLocation:fail not support GCJ02",
"errCode": 18,
"code": 18
}

更多关于uni-app nvue中uni.getLocation获取当前定位报错的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

一样的问题 +1

更多关于uni-app nvue中uni.getLocation获取当前定位报错的实战教程也可以访问 https://www.itying.com/category-93-b0.html


回到顶部