Parse platform 解析云代码:当键位于指针中时,如何按地理距离排序

Parse platform 解析云代码:当键位于指针中时,如何按地理距离排序,parse-platform,parse-server,Parse Platform,Parse Server,我的用例是按距离排序列表。我有Promo类,这是与Vendor类的多对一。我插入vendor输入Promo类。我使用.near,并设置键vendor.geo。但是我犯了一个错误。也许我做错了,但请给我正确的方法。谢谢 const promoQuery = new Parse.Query('Promo') .include('photo') .include('vendor') .include('vendor.name') .exists('vendor') .lessTha

我的用例是按距离排序列表。我有
Promo
类,这是与
Vendor
类的多对一。我插入
vendor
输入
Promo
类。我使用
.near
,并设置键
vendor.geo
。但是我犯了一个错误。也许我做错了,但请给我正确的方法。谢谢

const promoQuery = new Parse.Query('Promo')
  .include('photo')
  .include('vendor')
  .include('vendor.name')
  .exists('vendor')
  .lessThanOrEqualTo('startDate', currentDate)
  .greaterThanOrEqualTo('endDate', currentDate)
  .near('vendor.geo', new Parse.GeoPoint(currentGeo)) // this cause an error
  .descending('createdAt')

你好你解决了这个问题吗?我也面临同样的问题!grr!