Skip to content

Geofire iOS - Is there a way to retrieve the full data matching the geo query not just the keys and locations? #101

Open
@kesongxie

Description

@kesongxie

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions