com.google.maps

Class RoadsApi

  • java.lang.Object
    • com.google.maps.RoadsApi


  • public class RoadsApiextends java.lang.Object
    The Google Maps Roads API identifies the roads a vehicle was traveling along and provides additional metadata about those roads, such as speed limits.

    See also: Roads API documentation.

    • Method Detail

      • snapToRoads

        public 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.
      • snapToRoads

        public 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. Additionally, you can request that the points be interpolated, resulting in a path that smoothly follows the geometry of the road.
        Parameters:
        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.
      • speedLimits

        public static PendingResult<SpeedLimit[]> speedLimits(GeoApiContext context,                                                      LatLng... path)
        Returns the posted speed limit for given road segments. The provided LatLngs will first be snapped to the most likely roads the vehicle was traveling along.

        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.

      • speedLimits

        public static PendingResult<SpeedLimit[]> speedLimits(GeoApiContext context,                                                      java.lang.String... placeIds)
        Returns the posted speed limit for given road segments.

        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.

        Parameters:
        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.
      • snappedSpeedLimits

        public static PendingResult<SnappedSpeedLimitResponse> snappedSpeedLimits(GeoApiContext context,                                                                          LatLng... path)
        Returns the result of snapping the provided points to roads and retrieving the speed limits. This is useful for interactive applications where you need to


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14