firebase / firebase/geofire-objc
Geofire iOS - Is there a way to retrieve the full data matching the geo query not just the keys and locations?
- Dominant language
- Objective-C
- Stars
- 447
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Description
I wonder whether it's possible to get the full data that matches the Geoquery. For example, if I point my Geofire reference to my user and every user has his or her own location. By specifying the radius and center I want, ideally, I want to retrieve some sort of snapshots that contains a list of users given that center and radius instead of just the user ids and the locations information.
From the doc here, it only has an example get all the keys(since we are passing user id as the key when we created those geo locations, they will be the key retrieved from the observeEventType method below) that match the query, like so
var queryHandle = query.observeEventType(.KeyEntered, withBlock: { (key: String!, location: CLLocation!) in
println("Key '\(key)' entered the search area and is at location '\(location)'")
})
Otherwise, I have a make a query for each user to load their additional information, which is not good for actual practice.
Thanks
Contributor guide
Research direction
Start with the GeoQuery observeEventType API shown in the issue and the surrounding GeoFire iOS documentation. Determine whether matching snapshots are supported by the existing query interface or whether the request requires a new API and data-loading design; done would mean an agreed implementation path, not just a usage example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, objective-c
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100