Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zoom events that work in an android Mapview

I need to redraw the overlay after the user zooms.
What is the best way to do this?
I've tried everything I can think of (saving a getZoomLevel() state, overriding onUserInteraction()), nothing actually works.
The problem is, that draw() is being called when the user clicks zoom, so the information my draw method gets (About the map's state) is different from the state after the mapview finishes zooming.
Also, draw() isn't being called at the end of the zoom, so only if I pan the map the overlay is actually being drawn properly.

like image 863
Itsik Avatar asked May 12 '10 10:05

Itsik


1 Answers

As nobody has answered this in 7 months, I will write what I ended up doing.

I used a Handler to refresh the map manually after 500ms, it worked alright.

Handler handler;
handler.postDelayed(refreshRoute, 500);
like image 117
Itsik Avatar answered Sep 19 '22 18:09

Itsik