title: Distance calculated via Google Distance Matrix API and Google Map API
body: <p>I have an application where distance between two points received via API is different than that of when checked on google map app. This API has a direct monetary impact on business. </p>
  
  <p>eg: Using API <a href="https://maps.googleapis.com/maps/api/distancematrix/json?origins=13.13212951,80.24748131&amp;destinations=12.9593040,80.2450580&amp;mode=driving" rel="nofollow noreferrer">https://maps.googleapis.com/maps/api/distancematrix/json?origins=13.13212951,80.24748131&amp;destinations=12.9593040,80.2450580&amp;mode=driving</a></p>
  
  <pre><code>{
     "destination_addresses" : [
        "Plot No. 1, Developed Industrial Estate Near Perungudi Toll Plaza, Perungudi, Chennai, Tamil Nadu 600096, India"
     ],
     "origin_addresses" : [
        "Mosque, Teacher's Colony, Kodungaiyur, Chennai, Tamil Nadu 600118, India"
     ],
     "rows" : [
        {
           "elements" : [
              {
                 "distance" : {
                    "text" : "23.9 km",
                    "value" : 23921
                 },
                 "duration" : {
                    "text" : "1 hour 1 min",
                    "value" : 3680
                 },
                 "status" : "OK"
              }
           ]
        }
     ],
     "status" : "OK"
  }
  </code></pre>
  
  <p>But than using google map</p>
  
  <p><a href="https://i.stack.imgur.com/uyPmL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uyPmL.jpg" alt="enter image description here"></a></p>
  
  <p>I need a way to find the distance coved via optimal route</p>
  
  <p>Thanks in Advance</p>