Google Distance Matrix API
-
First of all thanks for sharing this plugin! I intend to use it to show the actual driving duration between two places. This is what Google sends on my request:
`// 20180526113151
// https://maps.googleapis.com/maps/api/distancematrix/json?origins=Dam,%20Amsterdam&destinations=Blaak,%20Rotterdam&departure_time=now&traffic_model=best_guess&key=************{
“destination_addresses”: [
“Blaak, Rotterdam, Nederland”
],
“origin_addresses”: [
“Dam, 1012 Amsterdam, Nederland”
],
“rows”: [
{
“elements”: [
{
“distance”: {
“text”: “79,6 km”,
“value”: 79552
},
“duration”: {
“text”: “1 uur 10 min.”,
“value”: 4190
},
“duration_in_traffic”: {
“text”: “1 uur 8 min.”,
“value”: 4104
},
“status”: “OK”
}
]
}
],
“status”: “OK”
}’Tried to import the duration_in_traffic / value (4104 seconds in this sample) into my post but without succes so far. This value, preferable in minutes and not in seconds, is the only variable I need. Can you help me?
- The topic ‘Google Distance Matrix API’ is closed to new replies.