我叫Bin
我叫Bin
  • 发布:2019-12-30 21:44
  • 更新:2019-12-31 12:21
  • 阅读:1258

关于uni.geLocation定位精度的

分类:uni-app

开发安卓app,使用uni.getLocation得到的精度一直是30米,同样位置使用gps软件可以定位到5米精度,求指导

onLoad() {  
            setInterval(this.getLocation, 5000)  
        },  
        methods: {  
            getLocation: function() {  
                let that = this  
                uni.getLocation({  
                    type: 'gcj20',  
                    geocode:true,  
                    altitude :true,  
                    success: function(res) {  
                        console.log(res)  
                        that.latitude = res.latitude  
                        that.longitude = res.longitude  
                        that.accuracy = res.accuracy  
                        that.poiName = res.address.poiName  
                        that.markList = [{  
                            latitude: res.latitude,  
                            longitude: res.longitude,  
                            iconPath: '../../static/water_detector_normal.png'  
                        }]  
                    }  
                })  
            },  
}
2019-12-30 21:44 负责人:无 分享
已邀请:
龙雨溪

龙雨溪

兄呆,你把 jj250 写错成了 gcj20

  • 我叫Bin (作者)

    额...多谢哥们...好丢人

    2020-01-02 09:27

  • 1***@qq.com

    是gcj02

    2022-02-15 17:50

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