0

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?

KENdi
  • 7,670
  • 2
  • 15
  • 27

1 Answers1

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
  • 499,950
  • 69
  • 739
  • 734