diff options
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index 9c34e39ca7..af3a535d7c 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -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(); |