title: Add distance to a latitude or longitude
body: <p>Say I have a latitude of 38.802610 and a longitude of -116.419389 and I want to be able to add a distance to that, 20 miles for example.</p>
  
  <p>So far I have came up with a rough idea on how I would do this</p>
  
  <ul>
  <li><p>Firstly, work out how many miles are in 1° of latitude, say for example it was 30</p></li>
  <li><p>Then, divide one by it:</p>
  
  <ul>
  <li>1 / 30 = 0.033333</li>
  </ul></li>
  <li>Add it to my original latitude to get my maximum ° of latitude:
  
  <ul>
  <li>38.802610 + 0.033333 = 38.8355943</li>
  </ul></li>
  <li>Subtract it to my original latitude to get my minimum ° of latitude:
  
  <ul>
  <li>38.802610 - 0.033333 = 38.769277 </li>
  </ul></li>
  </ul>
  
  <p>But this is flawed because there seems to be no direct conversion for longitude as from what I've read the calculation varies.</p>
  
  <p>Ultimately, I need to be able to find out the: </p>
  
  <ul>
  <li>maximum latitude (my current latitude + given distance e.g 20 miles)</li>
  <li>minimum latitude (my current latitude - given distance e.g 20 miles)</li>
  <li>maximum longitude (my current longitude + given distance e.g 20 miles)</li>
  <li>minimum longitude (my current longitude - given distance e.g 20 miles)</li>
  </ul>
  
  <p>Any help would be greatly appreciated, thank you.</p>