收藏
回答

统计定点范围内的对象数量报错(geonear count)

框架类型 问题类型 终端类型 AppID 基础库版本
小程序 Bug 微信安卓客户端 wx914753ce8255172d 2.9.4

统计定点范围内的对象数量报错

db.collection('house').where({
 
location: _.geoNear({
 
geometry: db.Geo.Point(event.location.longitude, event.location.latitude),
 
minDistance: event.minDis,
 
maxDistance: event.maxDis
 
})
 
}).count()

返回

Error: errCode: -502001 database request fail | errMsg: [FailedOperation.Query] (BadValue) $geoNear, $near, and $nearSphere are not allowed in this context; 

现象和这个问题一样

回答关注问题邀请回答
收藏
登录 后发表内容
问题标签