Code example for Address

Methods: getLatitude, getLongitude

0
 
	public void draw(Canvas canvas, MapView mapView, boolean shadow) {
		Projection projection = mapView.getProjection();
 
		if (shadow == false) {
			Double lat = address.getLatitude() * 1E6;
			Double lng = address.getLongitude() * 1E6;
			GeoPoint geoPoint = new GeoPoint(lat.intValue(), lng.intValue());
 
			Point myPoint = new Point();
			projection.toPixels(geoPoint, myPoint);
 
			Paint paint = new Paint();
			paint.setARGB(250, 255, 255, 255);
			paint.setAntiAlias(true);
			paint.setFakeBoldText(true);
 
			canvas.drawBitmap(bitmap, myPoint.x, myPoint.y, paint);
		} 
 
		super.draw(canvas, mapView, shadow);