Google 的用法 API

Usage of the Google's directions API

我正在使用 Google 的指示 API 来计算两个地址之间的距离。下面是我调用的URL

string url = "https://maps.googleapis.com/maps/api/directions/json?origin=" + origin + 
"&destination=" 
+ destination + "&key=" + key;
The following is part of the response I got.
legs:[ 
{ 
  distance:{ 
  text:13.4 mi,
  value:21608
},

文本的正确距离为 13.4 英里。我不确定 value:21608 代表什么。我以为是英尺或码,结果都不对。

文本是从小数点减去的值。 值以米为单位。

根据documentationdistance.value是以米为单位(value表示距离以米为单位)。