GeoFireStore在哪里查询 [英] GeoFireStore where Query

查看:74
本文介绍了GeoFireStore在哪里查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆