本文整理匯總了Java中android.location.Location.getBearing方法的典型用法代碼示例。如果您正苦於以下問題:Java Location.getBearing方法的具體用法?Java Location.getBearing怎麽用?Java Location.getBearing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.location.Location
的用法示例。
在下文中一共展示了Location.getBearing方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LocationInfo
import android.location.Location; //導入方法依賴的package包/類
LocationInfo(Location location) {
latitude = location.getLatitude();
longitude = location.getLongitude();
horizontalAccuracy = location.getAccuracy();
timeStampSecs = TimeUnit.MILLISECONDS.toSeconds(location.getTime());
speed = location.getSpeed();
course = location.getBearing();
altitude = location.getAltitude();
}
示例2: LocationRecord
import android.location.Location; //導入方法依賴的package包/類
public LocationRecord(Location location) {
super(new RecordInfo(location.getAccuracy(), location.getTime()));
this.latitude = location.getLatitude();
this.longitude = location.getLongitude();
this.altitude = location.getAltitude();
this.speed = location.getSpeed();
this.bearing = location.getBearing();
}