2

I've tried to find a solution for my task everywhere and got nothing. So I am here.

I'm trying to detect user's location with very high accuracy, but I am looking for the city only. What I mean: Device located in some quadratic or o-shaped city (Moscow for example). Now the app should detect current location of user's device - is it in Moscow or outside.. with high accuracy as I said earlier.

I don't understand how to "draw" a virtual border over the map to detect - user inside or outside of it.

Andrew Koshkin
  • 446
  • 3
  • 16
  • Nobody knows how to do that? – Andrew Koshkin Jan 15 '14 at 10:53
  • 1
    For the virtual border, you could make an MKPolygon. Then to check whether user coordinate is in the polygon, see stackoverflow.com/questions/4354130/how-to-determine-if-an-annotation-is-inside-of-mkpolygonview-ios/4354250#4354250 and http://stackoverflow.com/questions/19014926/detecting-a-point-in-a-mkpolygon-broke-with-ios7-cgpathcontainspoint?lq=1. –  Jan 15 '14 at 11:55
  • Thank you, Anna! I'm going to try your solution. – Andrew Koshkin Jan 15 '14 at 12:00

0 Answers0