Loop to add and remove markers,markers are not visible
When I was in the loop to add remove markers more than 25 times, Can't see any markers on the mapview
List<Marker> markers = mMapboxMap.getMarkers();
for (int i = 0; i < markers.size(); i++) {
markers.get(i).getIcon().getBitmap().recycle();
}
mMapboxMap.removeAnnotations();
mMapboxMap.addMarkers(markerList);
Platform: samsung s5 **Mapbox SDK version:**4.0.0-beta.2
Steps to trigger behavior
- mMapboxMap.removeAnnotations();
- mMapboxMap.addMarkers(markerList);
- mMapboxMap.removeAnnotations();
- mMapboxMap.addMarkers(markerList);
After 25 times or more,Markers are not visible anymore.
Expected behavior
Markers should be visible

Actual behavior
Markers are not visible


Hi there, I'm facing similiar issues for a while but thought it was related to the poor performance of my current phone (Sony Xperie P, Android 4.4.2 CM). My issue is not exactly the same but for me some certain markers are also not drawn after some iterations. It is possible that my experiences are a new issue but i want to share my experiences here first.
So, this occurs on 4.0.0-beta1 and 2 (didn't use the final because of the Marker issue of removeAnnotations()) and I have just tried the 4.1.0 Snapshot:
For some amount of time everything is working fine when I clear some annotations using removeAnnotations(List
In summary, it does not seem to be related to the removing and adding of markers, but rather to the newly creating of Icons.
My project code is located at https://github.com/Schumi09/WayTo-Navigation (Let me know if you need a more detailed description of my experiences)
My posted experiences are related to #4189 so it'll be fixed within #4207. However, it does not explain the issues during runtime which is also part of #4189 that @tobrun has closed. The OP here does not create new bitmaps in every iteration.
Hi, i'm facing similiar issues, after update 4.1.0-SNAPSHOT, previously not problem with 4.1.0-SNAPSHOT, how to fixed this?. Thanks.
This should be resolved with the introduction of View Markers in 4.1.0. Feel free to reach out to ask more questions! Closing as non actionable.