Package com.google.maps
Class DirectionsApi
- java.lang.Object
-
- com.google.maps.DirectionsApi
-
public class DirectionsApi extends java.lang.ObjectThe Google Directions API is a service that calculates directions between locations using an HTTP request. You can search for directions for several modes of transportation, include transit, driving, walking, or cycling. Directions may specify origins, destinations, and waypoints, either as text strings (e.g. "Chicago, IL" or "Darwin, NT, Australia") or as latitude/longitude coordinates. The Directions API can return multi-part directions using a series of waypoints.See the Directions API Developer's Guide for more information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectionsApi.Responsestatic classDirectionsApi.RouteRestrictionDirections may be calculated that adhere to certain restrictions.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DirectionsApiRequestgetDirections(GeoApiContext context, java.lang.String origin, java.lang.String destination)Creates a new DirectionsApiRequest between the given origin and destination, using the defaults for all other options.static DirectionsApiRequestnewRequest(GeoApiContext context)Creates a new DirectionsApiRequest using the given context, with all attributes at their default values.
-
-
-
Method Detail
-
newRequest
public static DirectionsApiRequest newRequest(GeoApiContext context)
Creates a new DirectionsApiRequest using the given context, with all attributes at their default values.- Parameters:
context- Context that the DirectionsApiRequest will be executed against- Returns:
- A newly constructed DirectionsApiRequest between the given points.
-
getDirections
public static DirectionsApiRequest getDirections(GeoApiContext context, java.lang.String origin, java.lang.String destination)
Creates a new DirectionsApiRequest between the given origin and destination, using the defaults for all other options.- Parameters:
context- Context that the DirectionsApiRequest will be executed againstorigin- Origin address as textdestination- Destination address as text- Returns:
- A newly constructed DirectionsApiRequest between the given points.
-
-