简体   繁体   English

Google Apps脚本地图API,用于计算两点之间的距离

[英]Google apps script map api for distance calculation between two points

I know there is an api to calculate the distance between two points for google apps but what i am looking for is the google apps script api to calculate the driving distance not the direct distance between two points. 我知道有一个api用于计算google应用的两点之间的距离,但是我正在寻找的是google apps脚本api,用于计算行驶距离而不是两点之间的直接距离。 Is there such an api? 有这样的API吗?

Google directions API gives you the total distance between the source and destination. Google Directions API为您提供源和目标之间的总距离。 try this 尝试这个

http://maps.googleapis.com/maps/api/directions/json?origin=nj&destination=ny&sensor=false

API Documentation here API文档在这里

One can follow the below link to get more details about it. 您可以点击下面的链接以获取更多详细信息。 Calculating driving distance with google map api v2 用google map api v2计算行驶距离

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM