geofirestore

How firebase http function to return snapshot to swift app

☆樱花仙子☆ 提交于 2021-01-29 15:26:42
问题 I have a firebase function performing a query and filtering by a geohash search radius. It's working but I am returning Json and what I really want to do is return a snapshot. I am new to firebase functions. Here is my firebase function var GeoFirestore = require('geofirestore').GeoFirestore; exports.geoQueryWitningRadius = functions.https.onRequest(async (req, res) => { const data = req.body; const lat = data.lat; const lon = data.lon; const radius = data.radius; const firestore = admin

GeoFireStore where Query

点点圈 提交于 2021-01-21 11:53:53
问题 I have the following Firestore database. The data in this firestore was added by geofirestore module https://github.com/geofirestore/geofirestore-js#example-usage. How can i query this firestore using geofire Queries to find where the field name="Sex" Please search a solution for React native thanks. enter image description here 回答1: You'll probably want to look at the docs for future queries you may have. However for the query you want it should be fairly simple... // Create query listener

Android Studio: Good practice for handling results from addGeoQueryDataEventListener

梦想的初衷 提交于 2020-01-16 14:09:59
问题 I am using Android Architecture Components ( Model-View-ViewModel ) to get the results from geoQuery.addGeoQueryDataEventListener() from GeoFirestore implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.5.0' Each event has its own callback and I am interested in all of them. I am also using BottomNavigationView what means that I only have one activity and all my logic is placed in the fragments. I started off by implementing onDocumentEntered() as shown below and I realized that

Retrieve users from Firestore within a range using GeoFireStore Android

删除回忆录丶 提交于 2019-12-23 20:14:06
问题 In my Android application, I need to get a list with users from Firestore within a range using GeoFireStore . Database structure in Firestore: All the information I got from this link. Dependency: implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.1.1' Repositories: maven { url 'https://jitpack.io' } A code: CollectionReference geoFirestoreRef = FirebaseFirestore.getInstance().collection("Users"); GeoFirestore geoFirestore = new GeoFirestore(geoFirestoreRef); GeoQuery geoQuery =

Is there a way I can combine a GeoFireStore query with a normal Firestore query?

雨燕双飞 提交于 2019-12-18 09:19:41
问题 I want to query users which I have stored in a collection named "Users". Each user has fields such as age and weight. Is there a way I can query the users by distance from the user running the search with GeoFire and combine it with FireStore search queries? For instance, I am a user who is looking for someone who is in a 20 mile radius but also wants to find someone who is between 2 years younger or older than them. 回答1: The Firestore database can filter on multiple fields, but it can only

Data structure in Firestore using GeoFirestore

送分小仙女□ 提交于 2019-12-11 12:28:23
问题 I write an Android application and use GeoFirestore . I can't to get a list with users from Firestore within a range 30 meters. I think that I wrong to make a structure of data. Data Structure: Did I build my data structure correctly? 回答1: I resolved my problem. My structure of data is not correct. The correct structure in the picture below: geoHash - String location - Array In array type of data is Number . 来源: https://stackoverflow.com/questions/56034936/data-structure-in-firestore-using

Angular Universal (ssr) not working for Firestore and Geofirestore

无人久伴 提交于 2019-12-09 03:27:05
问题 Issue : Angular Universal (ssr) not work for pages that use Firebase Firestore database. Tech : Angular version 7, Angular Cli, Angular Universal, Firebase hosting, Firebase Functions, Firebase Firestore database. My server side rendering works fine on all pages. Issue is when I view this page: [https://behired-staging.firebaseapp.com/job-board][1] it doesnt show the data. The data doesnt take too long to load either. I see the html, but not the ul li for the list of 20 jobs on display.

How can I use a GeoQuery to sort by both location and certain value? (Android)

守給你的承諾、 提交于 2019-12-04 05:48:01
问题 This is a Geoquery for Firestore: https://github.com/imperiumlabs/GeoFirestore-Android But it doesn't allow for further sorting. I want to sort by the nearest and most famous users, how could i do such a thing? Are there any other possible libraries? 回答1: Geofire already does something seemingly impossible on Firestore: it performs a range query on two values (lat and lon). It does this by creating a geohash value, which combines the latitude and longitude into a single value, that can be

How can I use a GeoQuery to sort by both location and certain value? (Android)

僤鯓⒐⒋嵵緔 提交于 2019-12-02 11:02:51
This is a Geoquery for Firestore: https://github.com/imperiumlabs/GeoFirestore-Android But it doesn't allow for further sorting. I want to sort by the nearest and most famous users, how could i do such a thing? Are there any other possible libraries? Geofire already does something seemingly impossible on Firestore: it performs a range query on two values (lat and lon). It does this by creating a geohash value, which combines the latitude and longitude into a single value, that can be used to select a range of documents that are close to each other. To allow additionally select on the range of

Ordering Firestore GeoHash query from closest to furthest?

情到浓时终转凉″ 提交于 2019-11-30 09:52:38
问题 Currently, I'm using parts of the GeoFirebase library along with Firestore to allow for geoquerying. When I set the geohash of a post, I do it as such if let geoHash = GFGeoHash(location: location.coordinate).geoHashValue { However, to make the geohash querying less specific, I'm planning on truncating part of the geohash when I query; currently, the query looks similar to this var geoQuerySpecific = GFGeoHashQuery() let geoQueryHash = GFGeoHashQuery.queries(forLocation: (lastLocation?