Closed jaykeerti closed 6 years ago
We need this too! How can I get more data than the key of an item? In your example (SFVehicles) you show positions only. What if all the items are a bit different? I would not like to have all items in a map and only show them when they enter the screen (or radius). Then I wouldn't need geofire anymore and would show all. But I would like to avoid loading all data!
Is this possible atm?
@andretietz You probably should keep different types of items in different lists /something/players /something/cars etc.. Regarding having additional data at geofire. I used different approach. Instead of adding data to geofire I added geofire to my data :). Kotlin example:
data class Point(val owner: UserKey,
val name: String,
val description: String?,
val type: PointType,
val g: String,
val l: List<Double>) {
constructor(owner: UserKey, name: String, description: String?, type: PointType, lat: Double, lng: Double) :
this(owner, name, description, type, GeoHash(lat, lng).geoHashString, listOf(lat, lng))
I had my reasons for mixing geofire and my data together. But in most situations you are better with those two separated.
Can't you just use a reference key and then store the data somewhere else?
Should we close this since it's inactive? If we ever run into this again we can create a new issue and put some more effort / dedication into this.
This can be closed @samtstern
@vanniktech thank you!
Can someone please help me on how to store extra data with Geofire like user details and some additional properties?