1

Is there any possibility to determine whether a user is inside or outside of a polygon area that I have marked on the map?

I would like to trigger an event if the user goes outside the area (only within the app, so no need for region monitoring)

Map showing part of the polygon area

Giovanni Palusa
  • 1,197
  • 1
  • 16
  • 36

2 Answers2

1

I was having the same problem on Android a while back.

I don't think this functionality is provided by IOS either, so you will have to find a way of making a custom function involving this:

Point In Polygon Algorithm

Nerdy Bunz
  • 6,040
  • 10
  • 41
  • 100
0

I found the solution here: - This takes a MKPolygon (which is important in this manner, since we can then know that the area is closed. So this is not possible to do if you make multiple polylines, since there is no good way of saying that they are connected to each other.

Giovanni Palusa
  • 1,197
  • 1
  • 16
  • 36