Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Inherited Constants | Fields | Ctors | Methods | Inherited Methods | [Expand All]
public final class

# LatLng

extends Object
implements Parcelable

java.lang.Object
↳ | com.google.android.gms.maps.model.LatLng

## Class Overview

An immutable class representing a pair of latitude and longitude coordinates, stored as degrees.

## Summary

[Expand] Inherited Constants

From interface android.os.Parcelable

int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Fields
public static final LatLngCreator | CREATOR |
public final double | latitude | Latitude, in degrees.
public final double | longitude | Longitude, in degrees.

Public Constructors
| LatLng(double latitude, double longitude) Constructs a LatLng with the given latitude and longitude, measured in degrees.

Public Methods
int | describeContents()
boolean | equals(Object o) Tests if this `LatLng` is equal to another.
int | hashCode()
String | toString()
void | writeToParcel(Parcel out, int flags)

[Expand] Inherited Methods

From class java.lang.Object

Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

From interface android.os.Parcelable

abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final LatLngCreator CREATOR

#### public final double latitude

Latitude, in degrees. This value is in the range [-90, 90].

#### public final double longitude

Longitude, in degrees. This value is in the range [-180, 180).

## Public Constructors

#### public LatLng (double latitude, double longitude)

Constructs a LatLng with the given latitude and longitude, measured in degrees.

##### Parameters

latitude | The point's latitude. This will be clamped to between -90 degrees and +90 degrees inclusive.
longitude | The point's longitude. This will be normalized to be within -180 degrees inclusive and +180 degrees exclusive.

## Public Methods

#### public int describeContents ()

#### public boolean equals (Object o)

Tests if this `LatLng` is equal to another.

Two points are considered equal if and only if their latitudes are bitwise equal and their longitudes are bitwise equal. This means that two `LatLng`s that are very near, in terms of geometric distance, might not be considered `.equal()`.

#### public int hashCode ()

#### public String toString ()

#### public void writeToParcel (Parcel out, int flags)