Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 谷歌电子表格中地点之间的实时旅行时间_Google Sheets_Mapquest_Google Distancematrix Api - Fatal编程技术网

Google sheets 谷歌电子表格中地点之间的实时旅行时间

Google sheets 谷歌电子表格中地点之间的实时旅行时间,google-sheets,mapquest,google-distancematrix-api,Google Sheets,Mapquest,Google Distancematrix Api,我想在我的谷歌电子表格中,根据当前天气/交通状况的开始时间计算两个地点之间的旅行时间。格式如下所示: 开始位置结束位置开始时间估计行程时间 我正在使用Mapquest Api =importXML("http://mapquestapi.com/directions/v1/route?key=APIKEY&outFormat=xml&from=" & A2 & "&to=" & B2,"//response/route/formattedTime"

我想在我的谷歌电子表格中,根据当前天气/交通状况的开始时间计算两个地点之间的旅行时间。格式如下所示:

开始位置结束位置开始时间估计行程时间

我正在使用Mapquest Api

=importXML("http://mapquestapi.com/directions/v1/route?key=APIKEY&outFormat=xml&from=" & A2 & "&to=" & B2,"//response/route/formattedTime")
但它给了我一个不正确的旅行时间,而且旅行时间不是实时的(基于我的开始时间)。有没有其他方法可以实现这一点?
编辑:
距离矩阵API是我遇到的东西,但不知道如何集成到谷歌电子表格中。有没有一种方法可以通过谷歌脚本在那里使用它?

你能举一个没有产生预期旅行时间的地点的例子吗

方向请求返回两种类型的时间:时间和实时。考虑到距离、速度限制和一些机动处罚,时间纯粹是数学上的。实时是指可用的流量时间