I need some ideas on how to implement something that seems easy but yet eludes me. Basically, I want to show a map and when people click on a location to save its pixel coordinates. I've done the click and save part by recycling some code from another example and drawing a fixation point on the mouse location on the canvas (see attachment). The problem is that when I add the png for the map in the while loop that controls the mouse, things slow down a lot. This is of course to be expected as the png gets redrawn on the canvas all the time, but how should I do this instead? Basically, I want to display the map once and redraw the mouse continuously. I tried putting the map outside of the loop but I haven't manged to make the mouse update as it should. Any ideas?
Thanks in advance,