小程序wx.getLocation的严重bug!
发布于 5 年前 作者 qiangdeng 4109 次浏览 来自 问答

wx.getLocation({

            type: ‘wgs84’,

            success: function(res) {

                var latitude = res.latitude

                var longitude = res.longitude

                console.log(‘腾讯wgs84:’ + latitude + ‘||’ + longitude)

            }

        })

wx.getLocation({

            type: ‘gcj02’,

            success: function(res) {

                var latitude = res.latitude

                var longitude = res.longitude

                console.log(‘腾讯gcj02:’ + latitude + ‘||’ + longitude)

            }

        })

最新版本微信和开发者工具,type均无效,获取相同的结果导致位置偏移

回到顶部