DJI Mobile SDK Documentation

class DJILatLng

class DJILatLng
Package:com.dji.mapkit.core.models
Description:

Represents a point which includes latitude, longitude, altitude, and accuracy info on a map.

Class Members:
method
method DJILatLng
DJILatLng(double latitude, double longitude)
Package:com.dji.mapkit.core.models
Description:

Creates a new DJILatLng object with the coordinates (latitude, longitude).

Input Parameters:
double latitudeThe latitude of the map point.
double longitudeThe longitude of the map point.
method
method DJILatLng
DJILatLng(double latitude, double longitude, double altitude)
Package:com.dji.mapkit.core.models
Description:

Creates a new DJILatLng object with the coordinates (latitude, longitude and altitude).

Input Parameters:
double latitudeThe latitude of the map point.
double longitudeThe longitude of the map point.
double altitudeThe altitude of the map point.
method
method DJILatLng
DJILatLng(double latitude, double longitude, double altitude, float accuracy)
Package:com.dji.mapkit.core.models
Description:

Creates a new DJILatLng object with four related parameters.

Input Parameters:
double latitudeThe latitude of the map point.
double longitudeThe longitude of the map point.
double altitudeThe altitude of the map point.
float accuracyThe accuracy of the map point.
method
method DJILatLng
DJILatLng(double latitude, double longitude, double altitude, float accuracy, long time)
Package:com.dji.mapkit.core.models
Description:

Creates a new LatLng object with five related parameters.

Input Parameters:
double latitudeThe latitude of the map point.
double longitudeThe longitude of the map point.
double altitudeThe altitude of the map point.
float accuracyThe accuracy of the map point.
long timeThe time of the map point.
method
method DJILatLng
DJILatLng(double latitude, double longitude, double altitude, float accuracy, long time, long elapsedRealtimeNanos)
Package:com.dji.mapkit.core.models
Description:

Creates a new LatLng object with five related parameters.

Input Parameters:
double latitudeThe latitude of the map point.
double longitudeThe longitude of the map point.
double altitudeThe altitude of the map point.
float accuracyThe accuracy of the map point.
long timeThe time of the map point.
long elapsedRealtimeNanosThe time in elapsed real-time of the map point.
method
method DJILatLng
DJILatLng(DJILatLng latLng)
Package:com.dji.mapkit.core.models
Description:

Creates a new DJILatLng object with a DJILatLng parameter.

Input Parameters:
DJILatLng latLngA DJILatLng object
method getLatitude
double getLatitude()
Package:com.dji.mapkit.core.models
Description:

Gets the latitude of the map point.

Return:
doubleThe latitude of the map point.
method setLatitude
void setLatitude(double latitude)
Package:com.dji.mapkit.core.models
Description:

Sets the latitude of the map point.

Input Parameters:
double latitudeThe latitude of the map point.
method getLongitude
double getLongitude()
Package:com.dji.mapkit.core.models
Description:

Gets the longitude of the map point.

Return:
doubleThe longitude of the map point.
method setLongitude
void setLongitude(double longitude)
Package:com.dji.mapkit.core.models
Description:

Sets the longitude of the map point.

Input Parameters:
double longitudeThe longitude of the map point.
method getAltitude
double getAltitude()
Package:com.dji.mapkit.core.models
Description:

Gets the altitude of the map point.

Return:
doubleThe altitude of the map point.
method getAccuracy
float getAccuracy()
Package:com.dji.mapkit.core.models
Description:

Gets the accuracy of the map point.

Return:
floatThe accuracy of the map point.
method setAccuracy
void setAccuracy(float accuracy)
Package:com.dji.mapkit.core.models
Description:

Sets the accuracy of the map point.

Input Parameters:
float accuracyThe accuracy of the map point.
method
method getTime
long getTime()
Package:com.dji.mapkit.core.models
Description:

Gets the time of the map point.

Return:
longThe time of the map point.
method
method setTime
void setTime(long time)
Package:com.dji.mapkit.core.models
Description:

Sets the time of the map point.

Input Parameters:
long timeThe accuracy of the point.
method getElapsedRealtimeNanos
long getElapsedRealtimeNanos()
Package:com.dji.mapkit.core.models
Description:

Gets the time in elapsed real-time of the map point.

Return:
longThe time in elapsed real-time of the point.
method setElapsedRealtimeNanos
void setElapsedRealtimeNanos(long elapsedRealtimeNanos)
Package:com.dji.mapkit.core.models
Description:

Sets the time in elapsed real-time of the map point.

Input Parameters:
long elapsedRealtimeNanosThe time in elapsed real-time of the point.
method isAvailable
boolean isAvailable()
Package:com.dji.mapkit.core.models
Description:

Determines if this map point is valid. A valid map point has a latitude in the range [-90,90], has a longitude in the range [-180,180], and is not (0,0).

Return:
booleantrue if this map point is valid.