Class RoadsApi

java.lang.Object
ai.nextbillion.maps.RoadsApi

public class RoadsApi
extends 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.

  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  RoadsApi.RoadsResponse  
  • Method Summary

    Modifier and Type Method Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • 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.
      Parameters:
      context - The GeoApiContext to make requests through.
      path - The collected GPS points as a path.
      Returns:
      Returns the snapped points as a PendingResult.