Class LatLng

java.lang.Object
ai.nextbillion.maps.model.LatLng
All Implemented Interfaces:
StringJoin.UrlValue, java.io.Serializable

public class LatLng
extends java.lang.Object
implements 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

    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 Details

    • lat

      public double lat
      The latitude of this location.
    • lng

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

    • 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 Details

    • toString

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

      public java.lang.String toUrlValue()
      Specified by:
      toUrlValue in interface StringJoin.UrlValue
      Returns:
      the object, represented as a URL value (not URL encoded).
    • 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