简体   繁体   English

Java - Google maps API - 两个地址之间的距离

[英]Java - Google maps API - distance between two addresses

Using Google Maps API how to determine the driving distance between two locations ? 使用Google Maps API如何确定两个位置之间的行车距离? Platform -Java 平台-Java

You will need to use the Google Directions Web Service . 您需要使用Google Directions Web Service You can make an HTTP request, specifying your two locations as parameters, and get back JSON (or XML) describing the directions between the two points. 您可以发出HTTP请求,将两个位置指定为参数,然后返回描述两点之间方向的JSON(或XML)。

NB The Google Maps terms of service explicitly states that using the Google Maps Web Services without putting the results on a Google Map is prohibited. 注意谷歌地图服务条款明确规定禁止使用谷歌地图网络服务而不将结果放在谷歌地图上。

I'm new in Java and I had the same issue. 我是Java的新手,我遇到了同样的问题。 That's why I've decided to make a Java library to provide theses information and more like route. 这就是为什么我决定创建一个Java库来提供这些信息,更像是路由。

Here's the link . 这是链接 Tell me what do you think about it and if it was useful for your case. 告诉我你怎么看待它以及它对你的情况是否有用。

Use the Directions API: http://code.google.com/apis/maps/documentation/directions/ 使用Directions API: http//code.google.com/apis/maps/documentation/directions/

The default travel mode is for driving. 默认的旅行模式是用于驾驶。

Please read the terms of service: http://code.google.com/apis/maps/terms.html 请阅读服务条款: http//code.google.com/apis/maps/terms.html

Particularly section 10.12 - which refers to using the results from this API. 特别是第10.12节 - 它指的是使用此API的结果。 In short, you must display it in conjunction with a Google map. 简而言之,您必须将其与Google地图一起展示。

暂无
暂无

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

相关问题 如何使用Google Maps Distance Matrix JAVA API获取源和多个目标之间的最近距离 - How to use Google Maps Distance Matrix JAVA API to obtain closest distance between source and multiple destinations 获取两个位置 android 谷歌地图之间的距离并画线 - Get distance and draw line between two location android google maps Android - 谷歌地图 - 计算两个位置之间的距离(LatLng) - Android - Google Maps - Calculate distance between two locations (LatLng) 如何为 Android (java) 配置谷歌地图距离矩阵 API - How to configure Google Maps Distance Matrix API for Android (java) android app:获取两个地址之间的距离 - android app: get distance between two addresses 计算时间和距离并在Google Maps v2中的两个可拖动标记之间绘制路径 - Calculate Time and distance and draw a path between two draggable markers in Google maps v2 使用谷歌地图距离矩阵api JSON输出获取距离 - get distance using google maps distance matrix api JSON output Google Maps API从2个坐标获取所有地址的列表 - Google maps api get list of all addresses from 2 coordinates 循环调用Google Maps API以对数十个地址进行地理编码并获取“ java.lang.String无法转换为net.sf.json.JSONObject” - Call Google Maps API in a loop to geocode dozens of addresses and get “java.lang.String cannot be cast to net.sf.json.JSONObject” Google Map Android API V2中两个位置之间的行驶距离和行驶时间 - Driving distance and travel time duration between two locations in Google Map Android API V2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM