views:

28

answers:

2

fellow stackoverflowers,

does any one know of a MapKit function that returns a BOOL or something to indicate whether two MKMapRect intersect or contain ?

+1  A: 

That's some fairly simple math, you could implement it yourself, or you could convert your MKMapRects to CGRects and use the CoreGraphics functions.

Kevin Ballard
+1  A: 

MapKit does contain some functions to help with this:

BOOL contains = MKMapRectContainsRect(rect1, rect2);
BOOL intersects = MKMapRectIntersectsRect(rect1, rect2);

See the documentation for more details and other useful functions.

aBitObvious