You could use the service
Distance Matrix API
then from c # basically using HttpClient
invoke that api to get the calculation
Here is explained great
Google Distance Matrix API with HttpClient and Json.NET
the idea is to use something like being
using (var client = new HttpClient())
{
var uri = new Uri(GetRequestUrl());
HttpResponseMessage response = await client.GetAsync(uri);
if (!response.IsSuccessStatusCode)
{
throw new Exception("GoogleDistanceMatrixApi failed with status code: " + response.StatusCode);
}
else
{
var content = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<Response>(content);
}
}
see how the answer json deserializa