geonear无法使用

发布于 6 年前作者 dfu6508 次浏览最后编辑 6 年前来自 ask
  • 当前 Bug 的表现(可附上截图)
  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

db.collection(‘business’)

.where({

location: db.command.geoNear({

geometry: db.Geo.Point(app.globalData.user_longitude, app.globalData.user_latitude),

minDistance: 0,

maxDistance: 5000,

})

})

1 回复
tao90
tao901 楼4 年前

在云开发平台添加地理位置索引就可以了