The problem is that when the bitmap is the entire map there is a lag in generating the bitmap.
If the bitmap is a smaller area the lag is unnoticeable.
This a bug we are fixing.
The code posted earlier if executed twice works without a problem.
Try using the code below, if you single tap on the map twice you will see the bitmap.
map.setOnSingleTapListener(new OnSingleTapListener() {
/**
*
*/
private static final long serialVersionUID = 1L;
public void onSingleTap(float arg0, float arg1) {
Polygon polygon = map.getExtent();
Envelope env = new Envelope();
polygon.queryEnvelope(env);
Bitmap bitmap = map.getDrawingMapCache(arg0, arg1,
100, 100));
// Bitmap bitmap = map.getDrawingMapCache(0, 0,
// map.getWidth(), map.getHeight()));
Log.d(TAG, "width = " + map.getWidth() + " ht = "
+ map.getHeight());
ImageView img = new ImageView(HelloWorld.this);
img.setImageBitmap(bitmap);
map.addView(img);
}
});
Thanks
Archana