[android] #3976 - hide info window when removing annotations

This commit is contained in:
Tobrun
2016-02-16 16:23:54 +01:00
parent f0e0a39acd
commit fd67579b09

View File

@@ -804,10 +804,15 @@ public class MapboxMap {
*/
@UiThread
public void removeAnnotations() {
Annotation annotation;
int count = mAnnotations.size();
long[] ids = new long[count];
for (int i = 0; i < count; i++) {
ids[i] = mAnnotations.keyAt(i);
annotation = mAnnotations.get(ids[i]);
if(annotation instanceof Marker){
((Marker)annotation).hideInfoWindow();
}
}
mMapView.removeAnnotations(ids);
mAnnotations.clear();