Hello, I'm using a google map function to return the distance between zip codes.
function callback(response, status) {
if (status == google.maps.DistanceMatrixStatus.OK) {
kmDistancia = (response.rows[0].elements[0].distance.text).split(" ",1);
tempoDistancia = response.rows[0].elements[0].duration.text;
}
}
The kmDistance , always returns comma (2,7)
, I have two questions ...
- How to change the comma by period, so I can complete the calculation.
- You can display after the 3 digit point.
Thank you.