0

Based on the documentation the geofire uses the following interface :

export interface GeoFireObj {
  '.priority': string;
  g: string;
  l: number[];
}

I would like to add title and picture to the interface so I can show an info window that displays the title and picture of each place.

I tried to change it but it did not work. my geofire set function is :

update(){
  this.geoFire.set({
    "some_keymscou", [45.777337, -73.632393],
    title: "Golf club",
    picture: this.pict
  }

  ).then(function () {
    console.log("Provided keys have been added to GeoFire");
  }, function (error) {
    console.log("Error: " + error);
  });
}

is it possible to change the geofire interface without affecting the real time queries

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Ben
  • 3
  • 2
  • The option to store additional information *was* added to GeoFire for Android. But if you want to store additional information for each key in GeoFire for JavaScript you will have to store that in a separate branch of the JSON. See https://stackoverflow.com/q/42608281, https://stackoverflow.com/a/38341118, https://stackoverflow.com/a/27862654 – Frank van Puffelen Aug 03 '18 at 13:20
  • Perfect, I saw the answer. thanks! – Ben Aug 03 '18 at 18:24

0 Answers0