Android: forced mapview remapping

I found that after changing the overlays on the MapView changes are not visible until the user moves the map, causing a redraw. Is there any way to make this redraw?

+4
source share
1 answer

In your Overlay, keep a link to MapView. Then, when you want to force the redraw, call:

 mMapView.invalidate(); 

Alternatively, if you are not in the user interface thread, you can call this:

 mMapView.postInvalidate(); 
+13
source

Source: https://habr.com/ru/post/1303703/


All Articles