dcloudio / dcloudio/native-docs

北斗定位系统的手机,无法获取定位

Open
#81 0 comments 0 reactions 1 assignee Claimed by @ArrayDC View on GitHub
Dominant language
No language data
Stars
88
Forks
75
PR merge metrics
No merged PRs in 30d

Description

北斗定位系统的手机,无法获取定位, 我的定位权限都给了,其它的安卓手机都是可以获取到的。
方法如下:
uni.getLocation({
type: 'wgs84', // wgs84 返回 GPS 坐标;gcj02 返回国测局坐标
isHighAccuracy: true,
highAccuracyExpireTime: 3000, // 高精度定位超时时间(ms),指定时间内返回最高精度,该值3000ms以上高精度定位才有效果
success: (res) => {
let lat = res.latitude
let lng = res.longitude
console.log('lat ' + lat + ' lng ' + lng)
console.log()
},
fail: (err) => {
console.log(err)
}
})

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.