Class LatLng

  • All Implemented Interfaces:
    com.google.maps.internal.StringJoin.UrlValue, java.io.Serializable

    public class LatLng
    extends java.lang.Object
    implements com.google.maps.internal.StringJoin.UrlValue, java.io.Serializable
    A place on Earth, represented by a latitude/longitude pair.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double lat
      The latitude of this location.
      double lng
      The longitude of this location.
    • Constructor Summary

      Constructors 
      Constructor Description
      LatLng()
      Serialisation constructor.
      LatLng​(double lat, double lng)
      Constructs a location with a latitude/longitude pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      java.lang.String toString()  
      java.lang.String toUrlValue()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • lat

        public double lat
        The latitude of this location.
      • lng

        public double lng
        The longitude of this location.
    • Constructor Detail

      • LatLng

        public LatLng​(double lat,
                      double lng)
        Constructs a location with a latitude/longitude pair.
        Parameters:
        lat - The latitude of this location.
        lng - The longitude of this location.
      • LatLng

        public LatLng()
        Serialisation constructor.
    • Method Detail

      • toString

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

        public java.lang.String toUrlValue()
        Specified by:
        toUrlValue in interface com.google.maps.internal.StringJoin.UrlValue
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object