GeoCoordinate

data class GeoCoordinate(val latitude: Double, val longitude: Double) : Parcelable

The implementation of geographic coordinates.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

latitude

Latitude value. It should be between -90.0 and 90.0.

longitude

Longitude value. It should be between -180.0 and 180.0.

Constructors

Link copied to clipboard
fun GeoCoordinate(latitude: Double, longitude: Double)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun angleTo(other: GeoCoordinate): Double

Calculates the angle (bearing) between this GeoCoordinate and the GeoCoordinate given as an argument.

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
fun distanceTo(other: GeoCoordinate): Distance

Calculates the geographic distance from this GeoCoordinate to the GeoCoordinate given as an argument.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun fractionTo(other: GeoCoordinate, distance: Distance): Double

Calculates the fraction between this GeoCoordinate and the GeoCoordinate comparing to the total distance.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun intermediatePointTo(other: GeoCoordinate, distance: Distance): GeoCoordinate

Calculates a GeoCoordinate between this GeoCoordinate and the GeoCoordinate given as an argument.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val latitude: Double
Link copied to clipboard
val longitude: Double