类 DistanceMatrixApi
java.lang.Object
ai.nextbillion.maps.DistanceMatrixApi
public class DistanceMatrixApi
extends java.lang.Object
The Google Distance Matrix API is a service that provides travel distance and time for a matrix
of origins and destinations. The information returned is based on the recommended route between
start and end points, as calculated by the Google Maps API, and consists of rows containing
duration and distance values for each pair.
This service does not return detailed route information. Route information can be obtained by
passing the desired single origin and destination to the Directions API, using DirectionsApi.
Note: You can display Distance Matrix API results on a Google Map, or without a map. If you want to display Distance Matrix API results on a map, then these results must be displayed on a Google Map. It is prohibited to use Distance Matrix API data on a map that is not a Google map.
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classDistanceMatrixApi.Response -
方法概要
修饰符和类型 方法 说明 static DistanceMatrixApiRequestgetDistanceMatrix(GeoApiContext context, LatLng[] origins, LatLng[] destinations)static DistanceMatrixApiRequestnewRequest(GeoApiContext context)
-
方法详细资料
-
newRequest
-
getDistanceMatrix
public static DistanceMatrixApiRequest getDistanceMatrix(GeoApiContext context, LatLng[] origins, LatLng[] destinations)
-