目录

LocationBase

Class Info

public class LocationBase extends NaviLatLng

导航定位基本信息对象类,只包含经纬度、精度、海拔、角度、速度、时间信息,不再扩展。

Public Constructor Summary

Constructor Name

LocationBase(double lat, double lng)

用给定的经度和纬度构造一个LocationBase。

LocationBase(LocationBase crd)

用给定的LocationBase构造一个LocationBase。

Public Method Summary

Qualifier and Type

Method Name and Description

float

getAccuracy()

获取精度。

double

getAltitude()

获取海拔高度。

float

getBearing()

获取角度。

float

getSpeed()

获取速度。

long

getTime()

获取时间。

Public Constructors

[h2]LocationBase(double lat, double lng)

Constructor

public LocationBase(double lat, double lng)

用给定的经度和纬度构造一个LocationBase。

Parameters

Name

Description

lat

纬度。

lng

经度。

[h2]LocationBase(LocationBase crd)

Constructor

public LocationBase(LocationBase crd)

用给定的LocationBase构造一个LocationBase。

Parameters

Name

Description

crd

导航定位基本信息对象类。

Public Methods

[h2]getAccuracy

Method

public float getAccuracy()

您调用此API可以获取精度。

Returns

Type

Description

float

返回精度。

[h2]getAltitude

Method

public double getAltitude()

您调用此API可以获取海拔高度。

Returns

Type

Description

double

返回海拔高度。

[h2]getBearing

Method

public float getBearing()

您调用此API可以获取角度。

Returns

Type

Description

float

返回角度。

[h2]getSpeed

Method

public float getSpeed()

您调用此API可以获取速度。

Returns

Type

Description

float

返回速度,单位:km/h。

[h2]getTime

Method

public long getTime()

您调用此API可以获取时间。

Returns

Type

Description

long

返回时间。