GeoFireStore在哪里查询 [英] GeoFireStore where Query
问题描述
我有以下Firestore数据库.此Firestore中的数据已添加通过geofirestore模块 https://github.com/geofirestore/geofirestore-js#example-usage.
I have the following Firestore database. The data in this firestore was added by geofirestore module https://github.com/geofirestore/geofirestore-js#example-usage.
如何使用geofire查询来查询此Firestore,以查找字段名称="Sex"
How can i query this firestore using geofire Queries to find where the field name="Sex"
请搜索解决方案以获取本机感谢.
Please search a solution for React native thanks.
推荐答案
上面由@MichaelSolati回答的查询适用于旧版本的GeoFireStore(2.x.x).这是迈克尔对3.xx版的相同查询的方式(取自 Github Issue ).
Above answered query by @MichaelSolati, works on the older version of GeoFireStore (2.x.x). Here is how the same query on the version 3.x.x by Michael (taken from Github Issue).
const geocollection: GeoCollectionReference = geofirestore.collection('Users');
const geoQuery = geocollection.near({
center: new firebase.firestore.GeoPoint(50.9235691,10.7218614),
radius: 10.5
}).where('d.details.name', '==', 'Sex');
这篇关于GeoFireStore在哪里查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!