Code example for Location

Methods: getAccuracy

0
 
		// Draw accuracy before marker 
		if (mIsAccuracyEnabled) {
			// Get the proportional accuracy radius based on the visible map 
			int radius = (int) mapView.getProjection().metersToEquatorPixels(
					lastFix.getAccuracy());
			// Draw the color 
			canvas.drawCircle(pointOnScreen.x, pointOnScreen.y, radius,
					mAccuracyFillPaint);
			// Draw the stroke 
			canvas.drawCircle(pointOnScreen.x, pointOnScreen.y, radius,
					mAccuracyStrokePaint);
		} 
 
		// Draw the marker on canvas 
		canvas.drawBitmap(mBitmap, matrix, mMarkerPaint);
 
		// Invalidate the MapView 
		mapView.postInvalidate();
	}