views:

83

answers:

1

In my iPhone app I'd like to monitor if the user enters some particular geographycal regions at a time and act consequently. I now saw that with the new iOS 4 it is possible to register some interest regions (CLRegion) to a CLLocationManager, so it would do some job for me, but... I'd also need to dynamically change the set of the regions (thus signaling the user only some region at some time) but it seems that Regions can only be added. Before noticing this change in iOS 4 I was planning on using an R-Tree to index all the regions (as rectangles in a 2d space) and query it on demand obviously adding/removing nodes by myself. Here are my questions: - Anyone knows if the CLLocationManager uses something similar to an R-Tree? - Is it extreamly efficient ? (I could put all my regions as registered at some point and the apply a filter such as looking in an NSSet of available-at-that-moment scenes) - I'd like to delete, at least, all the monitored regions in the CL, is it feasible? How?

+1  A: 

What's wrong with -[CLLocationManager stopMonitoringForRegion:]?

tc.
I feel like an idiot : D ty I totally missed that (maybe I got mislead by the fact that regions remain even between the application launches). Nevertheless, thank you.Do you know something about the performance of this framework?
rano