I am new to GeoFire database. I can able to insert GeoLocation, but I need to timestamp. Also, is there any way to insert/update timestamp via rule or what ever?
Asked
Active
Viewed 245 times
1 Answers
0
GeoFire stores (and allows querying) latitude and longitude associated with a key. It doesn't store anything else. Developers typically store additional information elsewhere in their database, under the same key. E.g. say you're storing the location of users:
locations
uid1: "geohashOfLocation1"
uid2: "geohashOfLocation2"
uid3: "geohashOfLocation3"
users
uid1: {
name: "Saranya Subramanian",
lastSeen: 1520260327510
}
uid2: {
name: "Frank van Puffelen",
lastSeen: 1520260356370
}
uid3: { ... }
So here you store the geo-data in /locations
and query that. And you store the other information about users in /users
and read from there when needed, e.g. when you get a user's uid
back from a geoquery.
Also see:

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
Thanks for the nice explanation @Frank van Puffelen – Saranya Subramanian Mar 06 '18 at 14:43