【发布时间】:2016-12-05 17:19:11
【问题描述】:
我正在尝试在不使用 GeoFire 的情况下在 Firebase 中实现基于位置的查询(因为上次更新是 6 个月前,它似乎已被弃用)
无论如何,我想不通。
它不会触发监听器。 当没有开始或结束时它有效。
查询如下所示:(仅使用 Latitude 进行测试)
// Testing, only doing longtude atm.
geoFlamesFIRReference
.queryStarting(atValue: coordinates!.longitude - radius, childKey: "longtitude")
.queryEnding(atValue: coordinates!.longitude + radius, childKey: "longtitude")
.queryLimited(toFirst: UInt(Constants.LIMIT_OF_FLAMES_ON_MAP))
.observe(.value, with: { snapshot in
print("New location?")
})
然后是我的一些数据示例:
【问题讨论】:
-
GeoFire 未被弃用。它工作正常,所以暂时不需要更新。
标签: ios swift firebase firebase-realtime-database