When I got to work in a new company, I looked at other people's projects, debugged the bugs, and found that the map was refreshed in one second, and Baidu map was flashing. According to the previous Baidu Map Project, I did not encounter this situation, but I also did not flash when I frequently added the cover and refreshed it. Later I looked at the previous Code and found the cause of the flash.
List ListvoerlaysList = mMapView. getOverlays (); // gets the map layer list.
ListvoerlaysList. add (mOverlay); // add a custom overlay.
MOverlay. addItem (overlayItem); // Add annotation points to the covering
We should directly operate on the covering layer when replacing the covering layer,
MOverlay. removeAll (); instead of listvoerlaysList. removeAll (arg0)
Simply put, the opposite error is that the covering layer cannot be added or deleted frequently; otherwise, the layer will flash. I mean, do not modify the layer frequently after it is added, you only need to modify the vertices on the layer to be the labels on the cover. You can operate the mOverlay object.