Comments (5)
Hi guys. We solved the problem. I hope this helps in some way.
The short answer is to normalise the location data so that it is at the base of the data hierarchy
In my example, the location object (created by Geofire) is located under the mondayRun object. However, you need all the location objects at the base of the tree so that the GeoFire circleQuery can access all of them.
Structure your data like this - with each location having a unique key that matches the element it relates to in the data structure. In the example, below you can see that our first location has a key of "team_-KbG2mHmbaQZzUDdNekv" which matches the key of the team entity which it relates to.
Then perform the GeoFire query to observe for matching locations. As each location returns, you can then use Firebase to get the info about the entity (in out case, "team_-KbG2mHmbaQZzUDdNekv").
Let me know if any of that doesn't make sense.
from geofire-objc.
If I change the first line of the code to:
GeoFire *geoFire = [[GeoFire alloc] initWithFirebaseRef:[_ref child:@"events/mondayrun"]];
it returns my object, but I need to get all the different run objects directly under "events".
from geofire-objc.
How are you adding data to your GeoFire index? Your data structure in the Firebase Realtime Database looks incorrect. Make sure you are using the latest version of the GeoFire library. Also, please share the code you used to add the data to your GeoFire index.
from geofire-objc.
I'm having the exact same issue, and my data structure looks exactly the same...
from geofire-objc.
I am also looking for the answer. I am unable to retrieve the data with GeoFire search query.
from geofire-objc.
Related Issues (20)
- Question : Does geoquery download all the the keys?
- What is the Pricing logic for Geo Queries? HOT 1
- Latest releases not supporting installation without cocoapods?
- 'FirebaseDatabase/FirebaseDatabase.h' file not found in v4.0.1
- Default firebase geofire rules not allowing writes.
- Fix warts in utils subspec HOT 1
- Question: Does key exited cover a document deleted from firestore?
- Can't get near Users by my location
- No support for firebase 7.0.0 HOT 12
- GeoFire on macOS HOT 1
- Query.observe doesn't seem to fire HOT 2
- Geofire Error HOT 4
- Is GeoFire being maintained?
- Update to latest FirebaseDatabase version needed for iOS 14.5 compatibility
- Documentation missing SPM support HOT 1
- GFUtils.queryBounds radius unit inconsistent
- Query last # of keys
- Does NOT work with latest Firebase (Firebase 9.0.0). HOT 7
- Need to know wether still being maintained? Current dependency constrains to < 9.0.0 and Firebase > 10.0 HOT 4
- dyld[3143]: Library not loaded: @rpath/GeoFire.framework/GeoFire HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geofire-objc.