geofire

Geofire - not found locations

青春壹個敷衍的年華 提交于 2019-12-19 05:59:31
问题 How can I get the all locations that are near to a passed GeoLocation(double lat, double lng) using Geo Queries. I have the following code (and it happens nothing): public void setCurrentLatLng(double lat, double lng){ this.lat = lat; this.lng = lng; GeoLocation geoLocation = new GeoLocation(lat, lng); updateCurrenLocation(geoLocation); GeoQuery geoQuery = geoFire.queryAtLocation(geoLocation, 8f); geoQuery.addGeoQueryDataEventListener(new GeoQueryDataEventListener() { @Override public void

how to save Location Info in Firebase

*爱你&永不变心* 提交于 2019-12-18 12:31:31
问题 I am trying to save location (so latitide and longitude) as one of the keys/fields in Firebase. In their example SFVehicles, they do show how to query once the information is stored but my problem is how do i save in the first place. In their blog post, GeoFire goes Mobile, they are showing how the data would look like - but how do I get that location field populated? I am able to save other types of strings to the Firebase though. I just use the code below. Question is What data type should

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

Error performing functions inside a GeoFire and Firebase query

霸气de小男生 提交于 2019-12-12 05:57:56
问题 I am querying nearby locations using Firebase and the results are correct when I do a systemPrint. But when I tried to create a new Location item and put it in a globally declared arrayList then loop through the ArrayList to print it. It doesn't print. I tried something similar with a hashset where I declare a global hashset and tried adding the id and geolocation to it, then loop through it, it didn't print. This is the printout when I do a systemPrint: 03-05 21:42:16.225 12604-12604/? I

Android GeoFire onKeyEntered not trigged

拈花ヽ惹草 提交于 2019-12-12 05:13:46
问题 The android geofire onKeyEntered is never executed for matching queryLocation. But onGeoQueryReady method is executed. so when I click on the menu bottombar, the addGeoQueryEventListener is executed and the onGeoQueryReady method is executed. But the onKeyEntered method is never executed. as you can see in the attachment, I have the location in the same node as the top level node. I have also include child path "xxx_location" in the DB reference. below are my API version. Geofire 2.1.1'

How to update GeoFire library to the latest version?

六月ゝ 毕业季﹏ 提交于 2019-12-12 04:30:56
问题 I'm developing an android app and I'm using GeoFire library in it. I have updated all of my code as per the latest version of Firebase , but I failed in updating GeoFire to the latest version which is causing a code conflict. Even on the github website of geofire, there is no such information. Upon running the app with old geofire version, I'm getting this error: Caused by: java.lang.RuntimeException: You need to set the Android context using Firebase.setAndroidContext() before using Firebase

GeoFire update in same call

 ̄綄美尐妖づ 提交于 2019-12-12 03:25:30
问题 I'm creating a Firebase update dictionary like so NSDictionary *update = @{ key1 : value1, key2 : value 2, key3 : value 3 }; [baseRef updateChildValues:update withCompletionBlock:^(NSError *error, Firebase *ref) { // complete }]; But I'd also like to save the coordinates of a location within the same update, aka not having to do 2 separate calls. I've taken a look at this Github page but I can't figure out how to do something like this [geoFire setLocation:[[CLLocation alloc] initWithLatitude

How much data is transferred with geofire set

回眸只為那壹抹淺笑 提交于 2019-12-12 01:29:45
问题 How much data is transferred when I send the location to geofire table with geoFire.set("?????", [??.????, ??.????]) after the connection of the browser client has be set up? Somekey is a unique id up to 5 digits? down to the 4th digit (gives us an accuracy of 11m according to Measuring accuracy of latitude and longitude) We want to show a client with a fleet in public transport that it isn't really that much - but want to give facts. It would be nice to get the data every 5-10 seconds. 回答1:

react native arrow functions and geoQueries

不问归期 提交于 2019-12-11 14:54:55
问题 I am still struggling a little bit with arrow functions. I have previously made these posts: react native and globally accessible objects react native arrow functions and if statements But now I am having a new issue with how these can be used with geoQuery. I have tried the code shown below: myFunction = () => { var onKeyMovedRegistration = () => geoQuery.on("key_moved", function(key, location, distance) { console.log('Test log'); if (key != this.props.userID) { arraySearchResult =

GeoFire Results Coming Back Unordered By Distance

久未见 提交于 2019-12-11 09:03:52
问题 I am using: geofire#4.1.2 bower_components\geofire └── firebase#3.9.0 I wrote this function to return a list of landmarks based on user proximity: GetAllLandmarksByUserLocation(ref, ref_locations, properties, user_latitude, user_longitude, user_radius) { const landmarkGeoFire = new GeoFire(ref_locations); var geoQuery = landmarkGeoFire.query({ center: [user_latitude, user_longitude], radius: user_radius }); return new Promise(function(resolve,reject) { var locations = []; var