The Android Developer Challenge is back! Submit your idea before December 2.

LatLng

class LatLng : VersionedParcelable
kotlin.Any
   ↳ androidx.car.cluster.navigation.LatLng

A representation of a latitude, longitude that can be serialized as a VersionedParcelable.

Unlike Location, this class only contains latitude and longitude and not other fields like bearing, speed and so on.

Summary

Public constructors

<init>(latitude: Double, longitude: Double)

Construct a new LatLng with the given latitude and longitude.

Public methods

Boolean
equals(other: Any?)

Double

Returns the latitude.

Double

Returns the longitude.

Int

String

Public constructors

<init>

LatLng(latitude: Double, longitude: Double)

Construct a new LatLng with the given latitude and longitude.

Public methods

equals

fun equals(other: Any?): Boolean

getLatitude

fun getLatitude(): Double

Returns the latitude.

getLongitude

fun getLongitude(): Double

Returns the longitude.

hashCode

fun hashCode(): Int

toString

fun toString(): String