Crack_Code
Crack_Code

Reputation: 57

Geo fencing for iOS

I just wanted to enable only particular height-lighted country from entire google map to let the user select any location just like Android.

I referred so many link but the only shape I could monitor is circular not country shape.

I have a string of lat longs of whole country.

Upvotes: 0

Views: 219

Answers (1)

Caleb
Caleb

Reputation: 124997

I referred so many link but the only shape I could monitor is circular not country shape.

Unfortunately, iOS currently only lets you monitor circular regions, which means that you'll need to do some more work to monitor arbitrary-shaped regions. You'll want to do something like:

  1. Create a circular region that's tangent to the nearest border and start monitoring it.

  2. When you get a notification that the user has moved outside the region, check to see whether they've crossed the border. If not, remove the current region and go to step 1.

Upvotes: 1

Related Questions