I've worked with GeoFire before, and from what I remember, when you store a location using setLocation in GeoFire, the Firebase structure is somewhat like this:
{
"3f7892b2-f304-4129-8416-0dc7216c2188" : {
"g" : "9qc9p66045",
"l" : {
0 : 37,
1 : -120
}
}
}
The problem is, I already have a realtime database up and running, and it has this structure:
{
"3f7892b2-f304-4129-8416-0dc7216c2188" : {
"username" : "bobby123",
"name" : "john",
"bio" : " I like dogs",
"location" : {
"lon" : 37,
"lat" : -120
}
}
}
So it has other data in there, besides location (which I'm currently storing using CLLocation, and just updating child value).
So my question is, what would be the most practical way to run a GeoFire query? I realize I can just use setLocation, and have the id by the userid, and make a reference to that later when I'm loading the users into tableview, but I'm curious if it's possible to run a GFQuery on my data the way it's set up currently.