Reputation: 1278
I wanna know if my point is in my bounding box using coordinates:
point to check:
CLLocation -> 48.847172 2.386597
bounding box :
maxLat minLat / maxLon minLon
"48.7998602295",
"48.8198640442",
"2.46138595581",
"2.48138619423"
how can i check that ?
Upvotes: 0
Views: 1342
Reputation: 69027
Would CGRectContainsPoint
bool CGRectContainsPoint (
CGRect rect,
CGPoint point
);
work for you?
You can convert a CLLocationCoordinate2D
into a CGPoint
like this:
CGPoint p = (CGPoint) { loc.latitude, loc.longitude };
Upvotes: 5