小编DRY*_*ver的帖子

使用firebase找到附近的latlng

-uniqueid1
            latitude: 30.7188235
            longitude: 76.810132
-uniqueid2
            latitude: 30.7188235
            longitude: 76.810132
Run Code Online (Sandbox Code Playgroud)

firebase中有1000个这样的记录,我想找到最接近特定long/lat的唯一ID.我开始使用startAt()和endAt()但没有成功.我们如何实现条件子句和多个查询.查询我寻找是

SELECT uniqueids from table where (lon-specific_lon)^2+(lat-specific_lat)^2<CONSTANT.
Run Code Online (Sandbox Code Playgroud)

firebase firebase-realtime-database

6
推荐指数
2
解决办法
2861
查看次数