Closed Moonrise1275 closed 9 years ago
Hey @Moonrise1275 - if I understand you correctly, you essentially just want to get all keys which are currently in an area and not listen for added/removed keys. You can do this using a combination of the "key_entered" and "ready" events:
var onReadyRegistration = geoQuery.on("ready", function() {
console.log("GeoQuery has loaded and fired all other events for initial data");
// Cancel the "key_entered" callback
onKeyEnteredRegistration.cancel();
});
var onKeyEnteredRegistration = geoQuery.on("key_entered", function(key, location, distance) {
console.log(key + " is in the query at " + location + " (" + distance + " km from center)");
});
with geofire? I mean existing objects. not a new/removed/moved one.