I’m using a custom Overlay class to display a marker on a MapView widget. I’m using the same image from another example that I found but my overlay is missing the shadow.
Here’s the original:

..and here’s mine:

How is that shadow created? Is that another drawable resource or some tricks in the draw method of the Overlay class. Thanks.
—
Here’s my Overlay class:
public class Mappin extends com.google.android.maps.Overlay {
private final GeoPoint geoPoint;
private final Context ctxContext;
public Mappin(Context ctxContext, GeoPoint geoPoint) {
super();
this.geoPoint = geoPoint;
this.ctxContext = ctxContext;
}
public boolean draw(Canvas canCanvas, MapView mvwMap, boolean booShadow, long lngWhen) {
super.draw(canCanvas, mvwMap, booShadow);
Point screenPts = new Point();
mvwMap.getProjection().toPixels(this.geoPoint, screenPts);
Bitmap bmp = BitmapFactory.decodeResource(this.ctxContext.getResources(), R.drawable.ic_location_marker);
canCanvas.drawBitmap(bmp, screenPts.x - bmp.getWidth() / 2, screenPts.y - bmp.getHeight(), null);
return true;
}
}
I found some code one that displayed the marker shadow. I needed to tweak the skewing factor to get it to work but it did the trick for now. Here’s the entire code of my custom
Overlay: