Open upsidedownone opened 5 years ago
Update: The comment here: https://github.com/imperiumlabs/GeoFirestore-iOS/issues/5#issuecomment-425996399 is what worked for me also. Note that all 3 events in updateLocations need to be modified, including the for the exit event. Not sure if I have something wrong in my setup, but making that change solved the issue. The .KeyEntered events are fired correctly and only when within the region.
I am having trouble getting this to work with my project. KeyEntered events get fired when they are not in the query. When debugging the code, I can see that in the updateLocations() function the info.isInQuery is set to false, but the event is still fired? It seems like once a document enters the search criteria (which is already larger than it should be by around half a mile?) it always fires a KeyEntered event, even after query.region is updated. It also occasionally returns two of the same object for key entered events.
I'm not exactly sure what I am doing wrong. Here is where I set up the query:
Then I update the region when the user moves the map location:
self.regionQuery.region = self.mapView.region
Does anybody know what I am doing incorrectly?