views:

59

answers:

0

While this may sound backwards, I have a need to draw to my Overlay in another class.

I get a bitmap from the MapsView, then essentially draw it on the overlay.

I am having difficulty doing this however.

Here is what I am doing. First I generate a bitmap from the mapview:

Bitmap bitmap = Bitmap.createBitmap(400, 800, 
            Bitmap.Config.ARGB_8888); 
Canvas canvas = new Canvas(bitmap); 
mapview.draw(canvas); 

At this point, I do some processing and need to draw the bitmap on the Overlay.

The overlay's draw method doesn't work, as it takes a canvas as a parameter but draws to that canvas.

It seems like when my overridden draw method is called, it is passed a sort of 'internal' canvas which is then drawn on top or whatever the map view.

Is there any way to access that through code? I feel I am missing something simple, and/or doing this very rube goldberg-ish. Thanks.