i have a problem like i mentioned at title. Please look at images at bottom first.
In this image you can easily see it's 130 meters but if i use Distance Matrix API it's showing 0.1 KM,
And here it's 180 Meters but it's showing 0.2 KM in distance matrix API. It's both google how can it be different..
And here's my code to get distance :
var service = new google.maps.DistanceMatrixService();
service.getDistanceMatrix(
{
origins: startArray, //LatLng Array
destinations: finishArray, //LatLng Array
travelMode: google.maps.TravelMode.DRIVING,
unitSystem: google.maps.UnitSystem.METRIC,
avoidHighways: false,
avoidTolls: false
}, callback);
function callback(response, status) {
if (status != google.maps.DistanceMatrixStatus.OK) {
alert('Error was: ' + status);
} else {
var origins = response.originAddresses;
var destinations = response.destinationAddresses;
for (var i = 0; i < origins.length; i++) {
var results = response.rows[i].elements;
console.log(results[i].distance.text);
document.getElementById('ctl00_MainContent_hidSpeed').value += results[i].distance.text+"&";
}
}
}
Any help would be appreciated