Android :: Way To Persist Graphics On A Canvas (map Overlay)?Feb 16, 2009
I've been searching around and can't seem to find a way to do this properly. I am doing some tracking where I want to draw dots on a map overlay recording previous positions. When onDraw of the overlay is called it seems the canvas is cleared so I have to redraw all of the history on every invocation. This could result in several thousands of dots being draw over time which seems to not be very efficient. Is there some flag somewhere that I have not found which tells a map overlay to be persistent? Or is there some way I can save and restore the canvas so I'm only maintaining/drawing the current point on each onDraw?