LatLon
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
A data class representing geographical coordinates (latitude and longitude).
1com.salesforce.marketingcloud.pushmodels.location1data class LatLon : ParcelableThe LatLon class is a Kotlin data class that represents geographical coordinates using latitude and longitude values. It implements Android’s Parcelable interface, allowing instances to be efficiently passed between Android components.
1@JvmField
2val latitude: DoubleThe latitude coordinate value.
1@JvmField
2val longitude: DoubleThe longitude coordinate value.
1fun latitude(): DoubleReturns the latitude coordinate.
Returns: The latitude value as a Double.
1fun longitude(): DoubleReturns the longitude coordinate.
Returns: The longitude value as a Double.
1object CompanionCompanion object for the LatLon class.
android.os.ParcelableLatLon automatically provides the following methods:
equals()hashCode()toString()copy()@JvmField annotation exposes the properties as public fields to Java code, enabling direct field access from Java.Parcelable implementation allows instances to be passed between Android components (Activities, Fragments, Services) efficiently.