I'm working on an app that lets a user select locations on a map. The entire map is subdivided into irregular regions (administrative boundaries), and when a user touches a point on a map, I need to be able to figure out which region the point belongs to. Just to clarify, there is no finite set of points for a user to choose from, they just tap anywhere on the map.
What is the best way to achieve this? I have been looking at MKPolygon
class but cannot really figure out if this is the way to go. If it is, would I be using intersectsMapRect:
method of the MKOverlay
protocol to check for a match? Are there any good tutorials on this kind of map operations?