Can any trig or GPS experts help me out here? I\'m trying to create a geo-spacial bounding box (rectangle) calculation returning the maximum latitude and longitude using the
I haven't looked at your code, but you could also use the MapKit function MKCoordinateRegionMakeWithDistance()
to have the framework calculate a bounding box for you.
CLLocationCoordinate2D center = { 37.3, -122.0 };
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(center, 2000.0, 2000.0);
CLLocationCoordinate2D northWestCorner, southEastCorner;
northWestCorner.latitude = center.latitude - (region.span.latitudeDelta / 2.0);
northWestCorner.longitude = center.longitude + (region.span.longitudeDelta / 2.0);
southEastCorner.latitude = center.latitude + (region.span.latitudeDelta / 2.0);
southEastCorner.longitude = center.longitude - (region.span.longitudeDelta / 2.0);