谷歌地图的距离和方向的API之间的区别 [英] Difference between Google Map Distance and Directions API

查看:172
本文介绍了谷歌地图的距离和方向的API之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谷歌提供的API 1.距离矩阵和2方向服务

Google provides APIs for 1. Distance Matrix and 2. Direction service

我试着搜索一下差1和2之间

I tried to search about difference between 1 and 2

我的任务是在从源代码的取值以目标用户移动ð   使用一些路径。我们需要显示的实际路径的用户已经走过   在谷歌地图

My task is "When user moves from Source S to Destination D using some path. We need to show the actual path user has traversed on Google Map"

什么是完成它的最佳方式是什么?

What is best way to accomplish it ?

1,使用距离矩阵API或2方向服务

Using 1. Distance Matrix APIs or 2. Direction service

推荐答案

根据谷歌地图API选择器

您使用路线服务,为使用各种运输方式从原产地获取指示目标位置:散步,开车,骑自​​行车,公共交通。获得从A点的路线到B点。

You use Directions service for getting directions from origin to destination location using various forms of transport: walking, driving, cycling, public transit. Get a route from point A to point B.

有关距离矩阵它计算行驶距离和行驶时间为多个出发地和目的地,可选择指定各种运输方式:步行,驾车,骑车

For Distance Matrix it calculate the travel distance and travel time for multiple origins and destinations, optionally specifying various forms of transport: walking, driving, cycling.

有关你的情况,我会建议路线服务,因为你不需要旅行时间。

For your case, I will suggest Directions service since you don't need travel time.

这篇关于谷歌地图的距离和方向的API之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆