firebase / geofire-js

GeoFire for JavaScript - Realtime location queries with Firebase
MIT License
1.44k stars 345 forks source link

Duplicate values being returned #137

Closed REPTILEHAUS closed 7 years ago

REPTILEHAUS commented 7 years ago

Im getting duplicates from this query, any ideas why ?


let geoQuery = this.geoFire.query({
  center: [this.lat, this.lng],
  radius: 1.609 //kilometers
});
geoQuery.on("ready", function() {
  // This will fire once the initial data is loaded, so now we can cancel the "key_entered" event listener
  onKeyEnteredRegistration.cancel();
});

let onKeyEnteredRegistration = geoQuery.on("key_entered", function(key, location, distance) {
  console.log(key + " entered query at " + location + " (" + distance + " km from center)");
});   
jwngr commented 7 years ago

This is a usage question, which is better suited for Stack Overflow or the Firebase Google Group. Can you please re-post on one of those forums and paste the link here? Please also remember to include version information and a code sample (if relevant) to help us resolve your issue.