云开发 Aggregate.geoNear 获得的两点距离 为什么 小于1米?

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

我们的地理位置都是通过wx.getLoction的type: wgs84 获得的经纬度,查询某点最近的数据时,却显示距离未0.00034米,无法正确计算两位置之间的距离

//这里是我的查询代码
await db.collection('users').aggregate()
    .geoNear({
      distanceField: 'distance', // 输出的每个记录中 distance 即是与给定点的距离
      spherical: true,
      near: db.Geo.Point(104.6740493774414, 28.813404083251953),
      includeLocs: 'location',
    })
    .end();

查出来的数据却显示distance 为小于1的米数:


0 回复
暂无回复