Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.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 maps 根据Google Maps API中经过的时间查找位置_Google Maps - Fatal编程技术网

Google maps 根据Google Maps API中经过的时间查找位置

Google maps 根据Google Maps API中经过的时间查找位置,google-maps,Google Maps,我正在使用谷歌地图API绘制一条多色路线。它应该根据两点之间经过的时间绘制不同的颜色。为此,我试图在用户输入到达该位置所需的时间后找到该位置 有什么方法可以这样做吗?用户输入这些位置的位置和时间?没有。他只输入开始和结束位置以及到达特定位置所用的时间。从那时起,我需要找到当前位置。要计算这一点,你还需要两个详细信息:用户所走的路线和平均速度用户所走的路线是我们在两点之间使用google directions时得到的路线。平均速度可以通过谷歌方向响应计算出来。我需要当前位置的纬度和经度值

我正在使用谷歌地图API绘制一条多色路线。它应该根据两点之间经过的时间绘制不同的颜色。为此,我试图在用户输入到达该位置所需的时间后找到该位置


有什么方法可以这样做吗?

用户输入这些位置的位置和时间?没有。他只输入开始和结束位置以及到达特定位置所用的时间。从那时起,我需要找到当前位置。要计算这一点,你还需要两个详细信息:用户所走的路线和平均速度用户所走的路线是我们在两点之间使用google directions时得到的路线。平均速度可以通过谷歌方向响应计算出来。我需要当前位置的纬度和经度值