public class RoadsApi
extends java.lang.Object
See also: Roads API documentation.
| Modifier and Type | Method | Description | 
|---|---|---|
static PendingResult<SnappedPoint[]> | 
nearestRoads(GeoApiContext context,
            LatLng... points) | 
 Takes up to 100 GPS points, and returns the closest road segment for each point. 
 | 
static PendingResult<SnappedSpeedLimitResponse> | 
snappedSpeedLimits(GeoApiContext context,
                  LatLng... path) | 
 Returns the result of snapping the provided points to roads and retrieving the speed limits. 
 | 
static PendingResult<SnappedPoint[]> | 
snapToRoads(GeoApiContext context,
           boolean interpolate,
           LatLng... path) | 
 Takes up to 100 GPS points collected along a route, and returns a similar set of data with the
 points snapped to the most likely roads the vehicle was traveling along. 
 | 
static PendingResult<SnappedPoint[]> | 
snapToRoads(GeoApiContext context,
           LatLng... path) | 
 Takes up to 100 GPS points collected along a route, and returns a similar set of data with the
 points snapped to the most likely roads the vehicle was traveling along. 
 | 
static PendingResult<SpeedLimit[]> | 
speedLimits(GeoApiContext context,
           LatLng... path) | 
 Returns the posted speed limit for given road segments. 
 | 
static PendingResult<SpeedLimit[]> | 
speedLimits(GeoApiContext context,
           java.lang.String... placeIds) | 
 Returns the posted speed limit for given road segments. 
 | 
public static PendingResult<SnappedPoint[]> snapToRoads(GeoApiContext context, LatLng... path)
context - The GeoApiContext to make requests through.path - The collected GPS points as a path.PendingResult.public static PendingResult<SnappedPoint[]> snapToRoads(GeoApiContext context, boolean interpolate, LatLng... path)
context - The GeoApiContext to make requests through.interpolate - Whether to interpolate a path to include all points forming the full
     road-geometry. When true, additional interpolated points will also be returned, resulting
     in a path that smoothly follows the geometry of the road, even around corners and through
     tunnels.path - The path to be snapped.PendingResult.public static PendingResult<SpeedLimit[]> speedLimits(GeoApiContext context, LatLng... path)
Note: The accuracy of speed limit data returned by the Google Maps Roads API cannot be guaranteed. Speed limit data provided is not real-time, and may be estimated, inaccurate, incomplete, and/or outdated. Inaccuracies in our data may be reported through Google Maps Feedback.
context - The GeoApiContext to make requests through.path - The collected GPS points as a path.PendingResult.public static PendingResult<SpeedLimit[]> speedLimits(GeoApiContext context, java.lang.String... placeIds)
Note: The accuracy of speed limit data returned by the Google Maps Roads API cannot be guaranteed. Speed limit data provided is not real-time, and may be estimated, inaccurate, incomplete, and/or outdated. Inaccuracies in our data may be reported through Google Maps Feedback.
context - The GeoApiContext to make requests through.placeIds - The Place ID of the road segment. Place IDs are returned by the snapToRoads(GeoApiContext, com.google.maps.model.LatLng...) method. You can pass up to
     100 placeIds with each request.PendingResult.public static PendingResult<SnappedSpeedLimitResponse> snappedSpeedLimits(GeoApiContext context, LatLng... path)
context - The GeoApiContext to make requests through.path - The collected GPS points as a path.PendingResult.public static PendingResult<SnappedPoint[]> nearestRoads(GeoApiContext context, LatLng... points)
context - The GeoApiContext to make requests through.points - The sequence of points to be aligned to nearest roadsPendingResult.