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.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With