Code example for Location

Methods: bearingTodistanceTo

0
 
	} 
 
	private void calculateDestinationAndBearing() { 
		if (null != mDestination && null != mMapCenter) {
			final int distance = (int) mMapCenter.distanceTo(mDestination);
			mRadarView.setBearing(mMapCenter.bearingTo(mDestination));
			mTextViewDistance.setText(Util.buildDistanceString(distance));
			if (mLastLocation != null) {
				mTextViewSpeed.setText(Util.buildSpeedString(mLastLocation.getSpeed()));
			} 
		} 
	} 
 
	/********************************************* 
	 * GPS Callbacks 
	 *********************************************/ 
 
	@Override 
	public void onLocationChanged(final Location location) {
		Log.i("RadarActivity", location.toString());