wx.getLocation获取到speed 在安卓一直为0 ios为-1

发布于 6 年前作者 zhenglei14216 次浏览最后编辑 6 年前来自 ask

wx.getLocation({

type: ‘wgs84’,

success(res) {

console.log(res.speed)

},

fail(res) {

console.log(JSON.stringify(res))

}

})

1 回复
yong54
yong541 楼4 年前

单次定位不支持speed,请关注后续的连续定位接口