[Android Q&A, Help & Troubleshooting] Nesh_:
Here is the light version of the code:

public class CustomMapView extends SurfaceView implements
SurfaceHolder.Callback, LocationListener {

private DrawingThread _thread;
private RenderingThread _threadStreets;

Context myContext;
Paint pt = new Paint();

final int SCREEN_HEIGHT = 600;
final int SCREEN_WIDTH = 480;

float scale;

int range = 100000;
static public int rotation = 0;

int sensibility = 100;

int lat;
int lon;

float translateX = -lat * scale - SCREEN_HEIGHT / 2;
float translateY = -lon * scale + SCREEN_WIDTH / 2;

boolean followLocation = true;
boolean isZooming = false;
boolean showLocation = true;
boolean followRotation = false;

static boolean drivingMode = false;

boolean DEBUG = true;
Handler mHandler;

public static GaiaApp gaia;

public CustomMapView(Context context, AttributeSet attrs) {
super(context, attrs);
getHolder().addCallback(this);

gaia = ((GaiaApp) context.getApplicationContext());

scale = gaia.getCurScale();

lat = (int) gaia.getCurPosition().getLatitude();
lon = (int) gaia.getCurPosition().getLongitude();
pf = new PathFinder();

startupDB();
myContext = context;
mHandler = new Handler();
_thread = new DrawingThread(getHolder(), this);
_threadStreets = new RenderingThread(this);

setFocusable(true);

pt.setFlags(Paint.DITHER_FLAG);
pt.setFilterBitmap(true);

this.invalidate();

}

@Override
public void onDraw(Canvas canvas) {

try {
canvas.drawColor(Color.WHITE);

pt.setAntiAlias(true);

canvas.rotate(-90, 0, 0);
canvas.translate(translateX, translateY);

canvas.scale(scale, scale);

canvas.rotate(-rotation, lat, lon);

// Drawing Points

Renderer.drawStreet(gaia.getStreets(), scale, canvas, pt);
Renderer.drawPolygon(gaia.getPolygons(), canvas, pt);
Renderer.drawPOI(myContext, gaia.getPOIs(), canvas, pt, scale, rotation);
Renderer.drawCustomPOI(myContext, gaia.getCustomPOI(), canvas, pt, scale, rotation);

if (showLocation) {

drawMarker(canvas);
}

if(drivingMode)
{
Renderer.drawRoute(gaia.getRoute(), canvas, pt);
}

} catch (Exception e) {

e.printStackTrace();

}

}

@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
// TODO Auto-generated method stub

}

@Override
public void surfaceCreated(SurfaceHolder holder) {

if (!_thread.isRunning()) {
_thread.setRunning(true);
_thread.start();
}

if (!_threadStreets.isRunning()) {
_threadStreets.setRunning(true);
_threadStreets.start();
}
}

@Override
public void surfaceDestroyed(SurfaceHolder holder) {

boolean retry = true;
_thread.setRunning(false);
_threadStreets.setRunning(false);

while (retry) {
try {
_thread.join();
_threadStreets.join();
retry = false;
} catch (InterruptedException e) {
// we will try it again and again...
}
}

}

class DrawingThread extends Thread {
private SurfaceHolder _surfaceHolder;
private CustomMapView _cmv;
private boolean _run = false;

public DrawingThread(SurfaceHolder surfaceHolder, CustomMapView cmv) {
super();
_surfaceHolder = surfaceHolder;
_cmv = cmv;
}

public void setRunning(boolean run) {

_run = run;

}

public boolean isRunning() {

return _run;

}

public SurfaceHolder getSurfaceHolder() {
return _surfaceHolder;
}

@Override
public void run() {
Canvas c;
while (_run) {
c = null;
try {
c = _surfaceHolder.lockCanvas();

synchronized (_surfaceHolder) {

_cmv.onDraw(c);

}
} finally {
if (c != null) {
_surfaceHolder.unlockCanvasAndPost(c);
}
}
}
}
}

class RenderingThread extends Thread {

CustomMapView _cmv;
Boolean _run = false;

public RenderingThread(CustomMapView cmv) {
super();
_cmv = cmv;

}

public void setRunning(boolean run) {

_run = run;

}

public boolean isRunning() {

return _run;

}

@Override
public void run() {
while (_run) {
try {

Log.d("CustomMapView", "Retrieving...");
new StreetRunnable(_cmv).run();
Log.d("CustomMapView", "Retrieving");

if(!followRotation)
rotation = 0;
else
rotation = gaia.getOrientation();

Log.d("CustomMapView", "Updating...");
mHandler.post(new Runnable() {
@Override
public void run() {
_cmv.invalidate();
}

});

Log.d("CustomMapView", "Updated");
} finally {
}
}
}

}

@Override
public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub

}

@Override
public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub

}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
// TODO Auto-generated method stub

}

}