title: Calculate approximate distance between two points
body: <p>I am trying to calculate approximate distance between two points with respect to road map on Google Maps. 75% of the time the points are not on a straight line, and they form a triangle on the road map. I am taking right angle as well as obtuse angle into consideration. And the line created by the points to be the hypotenuse. </p>
  
  <p>Lets take the line formed by the points: "x"<br>
  Other Two lines: "y" &amp; "z"<br>
  Assuming y and z equal</p>
  
  <p>Now I am taking two options as stated earlier for best result:</p>
  
  <p>Option 1:</p>
  
  <pre><code>y = x(sin 45)/(sin90)
  Total Distance = 2y
  </code></pre>
  
  <p>Option 2:</p>
  
  <pre><code>y = x(sin 30)/(sin120)
  Total Distance = 2y
  </code></pre>
  
  <p>On calculation the distance by getting the all the coordinates of the distance. It is different from both at and approximately 10 to 20%.</p>
  
  <p>In almost all cases the second one provides the best value on checking with the Google Maps vehicle distance.</p>
  
  <p>Is there any better alternative for maximum accuracy?</p>