public class RoadsApi
extends java.lang.Object
See also: Roads API documentation.
Modifier and Type | Method and Description |
---|---|
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)
public static PendingResult<SnappedPoint[]> snapToRoads(GeoApiContext context, boolean interpolate, LatLng... path)
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.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 the Google Map Maker service.
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 the Google Map Maker service.
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.public static PendingResult<SnappedSpeedLimitResponse> snappedSpeedLimits(GeoApiContext context, LatLng... path)