sdk-common / com.tomtom.online.sdk.common.location / LatLng

LatLng

open class LatLng : Serializable

Represents the information about the coordinates (latitude, longitude).

Types

Comparator

open class Comparator : Comparator<LatLng!>

Utility class that allows to compare between two geo points.

Constructors

<init>

LatLng()

Default constructor required by Serializable. Latitude and longitude are set to 0.0.

LatLng(latitude: Double, longitude: Double)

Instantiates a new LatLng object with provided latitude and longitude.

LatLng(location: Location)

Instantiates a new LatLng object based on data from Location object.

Functions

getLatitude

open fun getLatitude(): Double

Get latitude.

getLatitudeAsString

open fun getLatitudeAsString(): String

Converts longitude to string.

getLongitude

open fun getLongitude(): Double

Get longitude.

getLongitudeAsString

open fun getLongitudeAsString(): String

Converts latitude to string.

toArray

open static fun toArray(locations: MutableList<LatLng!>!): DoubleArray

Transforms a list of LatLng locations into an array of double values, ignoring altitude, radius and bearing. Latitude of location at index n is located at index n*2 in the resulting array. Longitude of location at index n is located at index n*2+1 in the resulting array.

toLocation

open fun toLocation(): Location

Converts to Location.

Inheritors

LatLngAcc

open class LatLngAcc : LatLng

Represents the information about the coordinates (latitude, longitude) with accuracy.