firebase / geofire-java

GeoFire for Java - Realtime location queries with Firebase
MIT License
671 stars 272 forks source link

Ability to use multi location updates with geofire #51

Open droidster opened 7 years ago

droidster commented 7 years ago

It would be a very good (probably ideal) way to do writes and updates if the data and location could be updated simultaneously, instead of writing the data, then writing location on success of data write, and reverting the operation all together incase of failure of either of the 2 writes.

Multi location updates is available in firebase, it could be a really good addition to geofire. Thoughts?

xsorifc28 commented 7 years ago

See here, I think that is what you are trying to do.

droidster commented 7 years ago

Hi @xsorifc28 Thanks for the link. I'm aware of that but I'm not sure if doing that will work with Geofire. Geofire stores location in a particular manner. I exported the json to post here.

"_locations" : {
    "geofire-key" : {
      ".priority" : "9q8yywdgue",
      "g" : "9q8yywdgue",
      "l" : [ 37.7853889, -122.4056973 ]
    }
  }

I don't know what "g" is and how it is created and looking at the exported json, it is same as ".priority", which again I don't know what it is. And "l" is an array, so I will need to store it like that and not use the GeoLocation object at all? I'm confused as to how to move forward.

xsorifc28 commented 7 years ago

I see what you're trying to do. An input from one of the devs would be helpful.

vanniktech commented 6 years ago

Is this something we want to support?