LatLon

A data class representing geographical coordinates (latitude and longitude).

Package 

1com.salesforce.marketingcloud.pushmodels.location

Declaration 

1data class LatLon : Parcelable

Overview 

The 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.

Module Information 

  • SDK: Salesforce Marketing Cloud Unified SDK
  • Module: Push Models Module
  • Module Version: 1.0.2
  • SDK Version: 11.0.0
  • Platform: androidJvm

Properties 

latitude 

1@JvmField
2val latitude: Double

The latitude coordinate value.

longitude 

1@JvmField
2val longitude: Double

The longitude coordinate value.

Methods 

latitude() 

1fun latitude(): Double

Returns the latitude coordinate.

Returns: The latitude value as a Double.

longitude() 

1fun longitude(): Double

Returns the longitude coordinate.

Returns: The longitude value as a Double.

Nested Types 

Companion 

1object Companion

Companion object for the LatLon class.

Inheritance 

  • Implements: android.os.Parcelable

Notes 

  • As a Kotlin data class, LatLon automatically provides the following methods:
    • equals()
    • hashCode()
    • toString()
    • copy()
  • The @JvmField annotation exposes the properties as public fields to Java code, enabling direct field access from Java.
  • The Parcelable implementation allows instances to be passed between Android components (Activities, Fragments, Services) efficiently.