Skip to main content

Coordinates

Coordinates

Type: public class

A class that defines a position in WGS84 coordinates system

Coordinates(double lat, double lng)

Type: public

Parameter NameTypeDescription
latdoublethe latitude
lngdoublethe longitude

Coordinates(double lat, double lng, Double alt)

Type: public

Parameter NameTypeDescription
latdoublethe latitude
lngdoublethe longitude
altDoublethe altitude

Coordinates(Coordinates other)

Type: public

Parameter NameTypeDescription
otherCoordinatesanother LatLngAlt

getLat()

Type: public double

Get the latitude

Returned Value: the latitude

setLat(double lat)

Type: public void

Set the latitude

Parameter NameTypeDescription
latdoublethe latitude

getLng()

Type: public double

Get the longitude

Returned Value: the longitude

setLng(double lng)

Type: public void

Set the longitude

Parameter NameTypeDescription
lngdoublethe longitude

getAlt()

Type: public [Double](https://developer.android.com/reference/java/lang/Double)

Get the altitude

Returned Value: the altitude

setAlt(Double alt)

Type: public void

Set the altitude

Parameter NameTypeDescription
altDoublethe altitude