LatLongPosition

Unmodifiable state version of LatLng, also implementing the GeoPosition interface.

Constructors

Link copied to clipboard
constructor(lat: Double, lon: Double)
constructor(lat: Double, lon: Double, distanceFormula: LatLongPosition.DistanceFormula)
constructor(lat: Double, lon: Double, distanceFormula: Int)
constructor(lat: Number, lon: Number)

Types

Link copied to clipboard
Possible methods to compute the distance between two latitude-longitude points.

Properties

Link copied to clipboard
Link copied to clipboard
Mean Earth radius in meters.

Functions

Link copied to clipboard
Link copied to clipboard
Distance between two points.
open fun distance(point1: LatLng, point2: LatLng, unit: LengthUnit, df: LatLongPosition.DistanceFormula): Double
Distance between two points with arbitrary LengthUnit.
Link copied to clipboard
open fun distanceInRadians(point1: LatLng, point2: LatLng, precision: LatLongPosition.DistanceFormula): Double
This "distance" function is mostly for internal use.
Link copied to clipboard
open fun distanceTo(@Nonnull other: GeoPosition): Double
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun getCoordinate(dimension: Int): Double
Link copied to clipboard
Link copied to clipboard
open fun getDimensions(): Int
Link copied to clipboard
open fun getLatitude(): Double
Link copied to clipboard
open fun getLongitude(): Double
Link copied to clipboard
open fun getX(): Double
Link copied to clipboard
open fun getY(): Double
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
open fun plus(@Nonnull other: GeoPosition): GeoPosition
Link copied to clipboard
open fun toString(): String