jimburton / BigArrow

MIT License
1 stars 10 forks source link

search optimisation through setting distance relative to bounds #19

Closed AlmasB closed 11 years ago

AlmasB commented 11 years ago

That should do it in theory, since updateNearestPlaces is called on locationChanged it'll also register updates with new minDistance

minDistance can be changed to local var later, unless we find another use for it

jimburton commented 11 years ago

I'm not sure about this but I think you need to remove the last listener before adding another (even though it's the same object) or we'll have too many updates. See http://developer.android.com/reference/android/location/LocationManager.html#removeUpdates%28android.location.LocationListener%29

jimburton commented 11 years ago

Is it possible to edit the patch? We've gone beyond my github knowhow here :) If not, I'll merge it then add the remove updates oneliner.

AlmasB commented 11 years ago

I'll just close this one, and pull fixed one, yeah we'd better remove previous listeners, at least we'll be sure there's only current one active