Reputation: 341
I have an app that has thousands of locations and I'd like to know when a user is at one. Because of battery life issues, I was thinking that I could monitor for significant location changes until the user entered a relatively large region (e.g., location+50 meters). At that point I'd switch to higher accuracy. I'd switch back to significant location changes when user leaves the region.
The problem is that it appears that I can only register 20 regions and I really don't want to have to figure out how to pre-process a bunch of locations to cluster them and properly calculate region size... plus this leads to a situation where region size could be so large as to be useless.
Another possibility is to just use the 20 closest regions but there are some cases where this isn't going to work.
Any ideas if there are workarounds to this 20 region limit?
Upvotes: 0
Views: 431
Reputation: 438467
Yes, there is a practical limit to how many regions you can monitor via startMonitoringForRegion
, but if you're just using plain old significant changes, there is absolutely no limit as to how many regions you keep track of yourself. Like you said, that's not as elegant as startMonitoringForRegion
, which can start your app for you, but it's an alternative.
Upvotes: 1
Reputation: 34677
Although I am aware that this is an Android link, the information from Google regarding Android location strategies should be easily applicable to iPhone (and other mobile platforms as well) as the techniques are the same.
Upvotes: 0