title: Calculating bounding box given center lat /long and distance on iOS?
body: <p>In my iOS app I have a lat and long that gives me my location. I want to be able to calculate the bounding box that satisfies a certain distance d from my location. How can I do this?</p>
  
  <p><strong>TRY 1:</strong>
  So I tried the solution given by @Neeku. I can see how it's supposed to return the right information but unfortunately it's off. So I don't think I can use it.</p>
  
  <p>The code I wrote is this and I pass in <strong>1000</strong> meters:</p>
  
  <pre><code>MKCoordinateRegion startRegion = MKCoordinateRegionMakeWithDistance(center, meters, meters);
  
  CLLocationCoordinate2D northWestCorner, southEastCorner;
  
  northWestCorner.latitude = startRegion.center.latitude + .5 * startRegion.span.latitudeDelta;
  northWestCorner.longitude = startRegion.center.longitude - .5 * startRegion.span.longitudeDelta;
  southEastCorner.latitude = startRegion.center.latitude - .5 * startRegion.span.latitudeDelta;
  southEastCorner.longitude = startRegion.center.longitude - .5 * startRegion.span.longitudeDelta;
  
  NSLog(@"CENTER &lt;%@,%@&gt;", @(center.latitude),@(center.longitude));
  NSLog(@"NW &lt;%@,%@&gt;, SE &lt;%@,%@&gt;",@(northWestCorner.latitude),@(northWestCorner.longitude),@(southEastCorner.latitude),@(southEastCorner.longitude));
  </code></pre>
  
  <p>So then the result is:
  <strong>CENTER &lt;38.0826682,46.3028721>
  NW &lt;38.08717278501047,46.29717303828632>, SE &lt;38.07816361498953,46.29717303828632></strong></p>
  
  <p>I then put that in google maps and get this: (see screenshot)</p>
  
  <p><img src="https://i.stack.imgur.com/ykof7.png" alt="enter image description here"></p>
  
  <p>So then to my understanding the 1000 meters should go from the center to the sides of the box. The map is measuring the corner which should be <strong>OVER</strong> 1000 meters and it's actually just over 800 meters. This is the problem I am trying to solve.</p>
  
  <p>I tried this method before and the distances simply aren't accurate. So, this solution has not worked for me. If you have more suggestions or maybe want to point out what is done wrong here please let me know.</p>
  
  <p>Thank you</p>