Class SnappedPoint

java.lang.Object
ai.nextbillion.maps.model.SnappedPoint
All Implemented Interfaces:
java.io.Serializable

public class SnappedPoint
extends java.lang.Object
implements java.io.Serializable
A point that has been snapped to a road by the Roads API.
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    LatLng location
    A latitude/longitude value representing the snapped location.
    int originalIndex
    The index of the corresponding value in the original request.
  • Constructor Summary

    Constructors 
    Constructor Description
    SnappedPoint()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • location

      public LatLng location
      A latitude/longitude value representing the snapped location.
    • originalIndex

      public int originalIndex
      The index of the corresponding value in the original request. Each value in the request should map to a snapped value in the response. However, if you've set interpolate=true, then it's possible that the response will contain more coordinates than the request. Interpolated values will not have an originalIndex. These values are indexed from 0, so a point with an originalIndex of 4 will be the snapped value of the 5th lat/lng passed to the path parameter.

      A point that was not on the original path, or when interpolate=false, will have an originalIndex of -1.

  • Constructor Details

  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object