public class DistanceMatrixApi
extends java.lang.Object
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: Use of the Distance Matrix API must relate to the display of information on a Google Map; for example, to determine origin-destination pairs that fall within a specific driving time from one another, before requesting and displaying those destinations on a map. Use of the service in an application that doesn't display a Google Map is prohibited.
Modifier and Type | Method and Description |
---|---|
static DistanceMatrixApiRequest |
getDistanceMatrix(GeoApiContext context,
java.lang.String[] origins,
java.lang.String[] destinations) |
static DistanceMatrixApiRequest |
newRequest(GeoApiContext context) |
public static DistanceMatrixApiRequest newRequest(GeoApiContext context)
public static DistanceMatrixApiRequest getDistanceMatrix(GeoApiContext context, java.lang.String[] origins, java.lang.String[] destinations)