Class LatLng

  • All Implemented Interfaces:

    
    public abstract class LatLng
    extends JsonSerializable
                        

    An object that represents a latitude/longitude pair.

    This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class LatLng.Builder

      Builder for LatLng.

    • Constructor Summary

      Constructors 
      Constructor Description
      LatLng()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Optional<Double> latitude() The latitude in degrees.
      abstract Optional<Double> longitude() The longitude in degrees.
      static LatLng.Builder builder() Instantiates a builder for LatLng.
      abstract LatLng.Builder toBuilder() Creates a builder with the same values as this instance.
      static LatLng fromJson(String jsonString) Deserializes a JSON string to a LatLng object.
      • Methods inherited from class com.google.genai.JsonSerializable

        fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait