梧桐树
梧桐树
  • 发布:2024-03-05 09:46
  • 更新:2024-03-05 09:46
  • 阅读:70

安卓手机系统定位报错

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 13.2 (22D49)

HBuilderX类型: 正式

HBuilderX版本号: 3.99

手机系统: Android

手机系统版本号: Android 14

手机厂商: 三星

手机机型: SM-A145R/DSN

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

uni.getLocation({
type: 'wgs84',
isHighAccuracy: true,
success: (res) => {
console.log('自身坐标:' + JSON.stringify(res))
this.latitude = res.latitude;
this.longitude = res.longitude;
this.covers.push({
id: 10086,
latitude: res.latitude,
longitude: res.longitude,
width: 40,
height: 40,
title: '自身位置',
iconPath: '../../static/images/dingwei.png'
})
this.getList();
},
fail: (err) => {
console.log(JSON.stringify(err))
// uni.showModal({
// content: '定位失败',
// success: (res) => {
// uni.navigateBack();
// }
// })
},
complete: () => {
console.log('获取经纬度')
}
})

操作步骤:

使用的谷歌地图,nvue页面。自定义基座和云打包后安装到手机上定位报错“getLocation:fail not support gcj02”

预期结果:

能够正常获取定位

实际结果:

getLocation:fail not support gcj02

bug描述:

使用的谷歌地图,nvue页面。自定义基座和云打包后安装到手机上定位报错“getLocation:fail not support gcj02”,即使改成wgs84类型也无法获取定位

2024-03-05 09:46 负责人:无 分享
已邀请:

要回复问题请先登录注册